Skip to content
Browse files

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

  • Loading branch information...
1 parent e991f99 commit 5dfc54c296ad9cd23d73e4bcf5c2c9c8a6bcd10a @indirect indirect committed
Showing with 10 additions and 16 deletions.
  1. +10 −16 lib/bundler.rb
View
26 lib/bundler.rb
@@ -73,22 +73,16 @@ def bundle_path
def 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

0 comments on commit 5dfc54c

Please sign in to comment.
Something went wrong with that request. Please try again.