summaryrefslogtreecommitdiff
path: root/lib/bundler/friendly_errors.rb
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-08-02 07:27:06 +0900
committerHomu <homu@barosl.com>2016-08-02 07:27:06 +0900
commit7f82490b82680c1786bd0af7f014d7ddab07629f (patch)
treec9976e55afa11be909157042eb0b434c46822b01 /lib/bundler/friendly_errors.rb
parent9dd84228ddf50af118efbc68bf341c0b1eb00e1a (diff)
parent23505779beb8694248e8c62bb049a40fd36d9290 (diff)
downloadbundler-7f82490b82680c1786bd0af7f014d7ddab07629f.tar.gz
Auto merge of #4795 - allenzhao:issue-4771, r=RochesterinNYC
Add message filter to generate better search URL Fixes #4771 /c @RochesterinNYC @segiddins
Diffstat (limited to 'lib/bundler/friendly_errors.rb')
-rw-r--r--lib/bundler/friendly_errors.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index b6c22ee60e..df45dd6946 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