lib/bundler/friendly_errors.rb in bundler-2.0.2 vs lib/bundler/friendly_errors.rb in bundler-2.1.0.pre.1
- old
+ new
@@ -1,10 +1,9 @@
-# encoding: utf-8
# frozen_string_literal: true
require "cgi"
-require "bundler/vendored_thor"
+require_relative "vendored_thor"
module Bundler
module FriendlyErrors
module_function
@@ -27,11 +26,11 @@
raise error unless error.message =~ /cannot load such file -- openssl|openssl.so|libcrypto.so/
Bundler.ui.error "\nCould not load OpenSSL."
Bundler.ui.warn <<-WARN, :wrap => true
You must recompile Ruby with OpenSSL support or change the sources in your \
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL \
- using RVM are available at http://rvm.io/packages/openssl.
+ using RVM are available at https://rvm.io/packages/openssl.
WARN
Bundler.ui.trace error
when Interrupt
Bundler.ui.error "\nQuitting..."
Bundler.ui.trace error
@@ -43,11 +42,11 @@
"You can decrease the amount of memory Bundler needs by removing gems from your Gemfile, " \
"especially large gems. (Gems can be as large as hundreds of megabytes, and Bundler has to read those files!). " \
"Alternatively, you can increase the amount of memory the JVM is able to use by running Bundler with jruby -J-Xmx1024m -S bundle (JRuby defaults to 500MB)."
else request_issue_report_for(error)
end
- rescue
+ rescue StandardError
raise error
end
def exit_status(error)
case error
@@ -122,10 +121,10 @@
def self.with_friendly_errors
yield
rescue SignalException
raise
- rescue Exception => e
+ rescue Exception => e # rubocop:disable Lint/RescueException
FriendlyErrors.log_error(e)
exit FriendlyErrors.exit_status(e)
end
end