diff options
author | Zehan Zhao <cnallenzhao@gmail.com> | 2016-07-18 20:21:45 +0800 |
---|---|---|
committer | Zehan Zhao <cnallenzhao@gmail.com> | 2016-07-29 14:26:57 +0800 |
commit | 23505779beb8694248e8c62bb049a40fd36d9290 (patch) | |
tree | b637ecce9e0b8048f8137eca02af9e723dce2a6c /lib/bundler/friendly_errors.rb | |
parent | 0db993851608f961267bdbfcca37936a07df402f (diff) | |
download | bundler-23505779beb8694248e8c62bb049a40fd36d9290.tar.gz |
Add message filter and spec for better search URL
Diffstat (limited to 'lib/bundler/friendly_errors.rb')
-rw-r--r-- | lib/bundler/friendly_errors.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb index a01c03f25c..d8c68f552d 100644 --- a/lib/bundler/friendly_errors.rb +++ b/lib/bundler/friendly_errors.rb @@ -89,8 +89,10 @@ module Bundler end def issues_url(exception) + message = exception.message.lines.first.tr(":", " ").chomp + message = message.split("-").first if exception.is_a?(Errno) "https://github.com/bundler/bundler/search?q=" \ - "#{CGI.escape(exception.message.lines.first.chomp)}&type=Issues" + "#{CGI.escape(message)}&type=Issues" end end |