summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-04-21 14:47:31 -0700
committerAndre Arko <andre@arko.net>2010-04-21 14:47:31 -0700
commit3a8260523af31eb4a3cd1a933233a53c0b9148e9 (patch)
tree4113f73367aba3f120a4259a41be1fcd25a4cbf2
parent30c67f3a1969e45cb7fd4d268ad7eb2ac46f85d2 (diff)
downloadbundler-3a8260523af31eb4a3cd1a933233a53c0b9148e9.tar.gz
Don't call exit! if Bundler.setup has an exception
-rw-r--r--lib/bundler.rb26
1 files changed, 10 insertions, 16 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 40226f7cb7..eca6c6d483 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -70,22 +70,16 @@ module Bundler
def gem_setup(*groups)
return @setup if @setup
- begin
- if groups.empty?
- # Load all groups, but only once
- @setup = load.setup
- else
- # Figure out which groups haven't been loaded yet
- unloaded = groups - (@completed_groups || [])
- # Record groups that are now loaded
- @completed_groups = groups | (@completed_groups || [])
- # Load any groups that are not yet loaded
- unloaded.any? ? load.setup(*unloaded) : load
- end
- rescue Bundler::GemNotFound => e
- STDERR.puts e.message
- STDERR.puts "Try running `bundle install`."
- exit!
+ if groups.empty?
+ # Load all groups, but only once
+ @setup = load.setup
+ else
+ # Figure out which groups haven't been loaded yet
+ unloaded = groups - (@completed_groups || [])
+ # Record groups that are now loaded
+ @completed_groups = groups | (@completed_groups || [])
+ # Load any groups that are not yet loaded
+ unloaded.any? ? load.setup(*unloaded) : load
end
end
alias setup gem_setup unless defined?(Bundler::ENV_LOADED)