diff options
Diffstat (limited to 'lib/bundler/cli.rb')
-rw-r--r-- | lib/bundler/cli.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 3a26a3be9d..32d68f1be5 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -175,8 +175,9 @@ module Bundler desc "cache", "Cache all the gems to vendor/cache", :hide => true method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache." def cache - Bundler.load.cache - Bundler.load.prune_cache unless options[:no_prune] + environment = Bundler.load + environment.cache + environment.prune_cache unless options[:no_prune] rescue GemNotFound => e Bundler.ui.error(e.message) Bundler.ui.warn "Run `bundle install` to install missing gems." |