summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-05-12 13:52:34 -0700
committerAndre Arko <andre@arko.net>2010-05-12 13:52:34 -0700
commite4287d26ad52b4db5c6379432dd201bf1a0eb311 (patch)
tree82c90131659bd90b08f9912f3dc4c55e539644b4
parent5cbe9af56e18ea6ea6ade10225a18076db5eb460 (diff)
downloadbundler-e4287d26ad52b4db5c6379432dd201bf1a0eb311.tar.gz
Add install option --no-cache to prevent updating the cache.
-rw-r--r--lib/bundler/cli.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 0fff9000d4..847dd05a35 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -72,6 +72,7 @@ module Bundler
method_option "relock", :type => :boolean, :banner => "Unlock, install the gems, and relock."
method_option "disable-shared-gems", :type => :boolean, :banner => "Do not use any shared gems, such as the system gem repository."
method_option "gemfile", :type => :string, :banner => "Use the specified gemfile instead of Gemfile"
+ method_option "no-cache", :type => :boolean, :banner => "Don't update the existing gem cache."
method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache."
def install(path = nil)
opts = options.dup
@@ -94,7 +95,7 @@ module Bundler
end
lock if options[:relock]
- cache if Bundler.root.join("vendor/cache").exist?
+ cache if Bundler.root.join("vendor/cache").exist? && !options[:no_cache]
Bundler.ui.confirm "Your bundle is complete! " +
"Use `bundle show [gemname]` to see where a bundled gem is installed."
rescue GemNotFound => e