Commit 6e5ea313 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Try to detect and remove local paths from error messages when generating a…

Try to detect and remove local paths from error messages when generating a ‘search for existing tickets’ URL.

Closes https://github.com/CocoaPods/CocoaPods/issues/2057
parent cbf504ca
......@@ -8,6 +8,7 @@ module Pod
module ErrorReport
class << self
def report(exception)
pathless_exception_message = exception.message.gsub(/- \(.*\):/, '- ():')
return <<-EOS
#{'――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――'.reversed}
......@@ -45,7 +46,7 @@ Repositories : #{repo_information.join("\n ")}
#{'[!] Oh no, an error occurred.'.red}
#{error_from_podfile(exception)}
#{'Search for existing github issues similar to yours:'.yellow}
#{"https://github.com/CocoaPods/CocoaPods/search?q=#{CGI.escape(exception.message)}&type=Issues"}
#{"https://github.com/CocoaPods/CocoaPods/search?q=#{CGI.escape(pathless_exception_message)}&type=Issues"}
#{'If none exists, create a ticket, with the template displayed above, on:'.yellow}
https://github.com/CocoaPods/CocoaPods/issues/new
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment