Permalink
Browse files

Don't call exit! if Bundler.setup has an exception

  • Loading branch information...
1 parent 30c67f3 commit 3a8260523af31eb4a3cd1a933233a53c0b9148e9 @indirect indirect committed Apr 21, 2010
Showing with 10 additions and 16 deletions.
  1. +10 −16 lib/bundler.rb
View
@@ -70,22 +70,16 @@ def bundle_path
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)

0 comments on commit 3a82605

Please sign in to comment.