Permalink
Browse files

Add install option --no-cache to prevent updating the cache.

  • Loading branch information...
1 parent 5cbe9af commit e4287d26ad52b4db5c6379432dd201bf1a0eb311 @indirect indirect committed May 12, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/bundler/cli.rb
View
@@ -72,6 +72,7 @@ def check
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 @@ def install(path = nil)
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

0 comments on commit e4287d2

Please sign in to comment.