Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Don't call exit! if Bundler.setup has an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Apr 23, 2010
1 parent e991f99 commit 5dfc54c
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions lib/bundler.rb
Expand Up @@ -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

Expand Down

0 comments on commit 5dfc54c

Please sign in to comment.