diff options
| author | Pieter Joost van de Sande <pj@born2code.net> | 2013-05-19 19:36:01 +0200 |
|---|---|---|
| committer | Andre Arko <andre@arko.net> | 2013-05-22 14:45:06 -0700 |
| commit | 8df765798fb4ef5957e46e7def6cb4d36ee1239c (patch) | |
| tree | 54774302d8b5ea71c6aaad4ede442f7af8fe0b6a | |
| parent | 0dc8b9852b25a0d93596a5a6e787592ad4ba0aae (diff) | |
| download | bundler-8df765798fb4ef5957e46e7def6cb4d36ee1239c.tar.gz | |
Rescue thor errors
Since debug flag is set thor raises errors. Rescue the error and print
the message to the ui. Then exit with a failing exit code.
| -rw-r--r-- | lib/bundler/friendly_errors.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb index 1a8b9aa384..388d9b1886 100644 --- a/lib/bundler/friendly_errors.rb +++ b/lib/bundler/friendly_errors.rb @@ -5,6 +5,9 @@ module Bundler Bundler.ui.error e.message, :wrap => true Bundler.ui.trace e exit e.status_code + rescue Thor::Error => e + Bundler.ui.error e.message + exit 1 rescue LoadError => e raise e unless e.message =~ /cannot load such file -- openssl|openssl.so|libcrypto.so/ Bundler.ui.error "\nCould not load OpenSSL." |
