lib/bundler/friendly_errors.rb in bundler-1.13.0.rc.1 vs lib/bundler/friendly_errors.rb in bundler-1.13.0.rc.2
- old
+ new
@@ -10,11 +10,11 @@
def log_error(error)
case error
when YamlSyntaxError
Bundler.ui.error error.message
Bundler.ui.trace error.orig_exception
- when Dsl::DSLError
+ when Dsl::DSLError, GemspecError
Bundler.ui.error error.message
when GemRequireError
Bundler.ui.error error.message
Bundler.ui.trace error.orig_exception, nil, true
when BundlerError
@@ -87,11 +87,13 @@
https://github.com/bundler/bundler/issues/new
EOS
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
def self.with_friendly_errors
yield