diff options
author | Carl Lerche <carllerche@mac.com> | 2010-02-03 22:43:07 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-02-03 22:49:37 -0800 |
commit | 4ebd4da3ec4220c448aa16dd096b35008532fa43 (patch) | |
tree | d21d9e15d5337cb58640db1320c2c948033a3ca6 /lib/bundler/runtime.rb | |
parent | e993e6f81661ed283664f6913a2de3f8eb379319 (diff) | |
download | bundler-4ebd4da3ec4220c448aa16dd096b35008532fa43.tar.gz |
Fix a bug with git repos and bundle lock breaking the install
Diffstat (limited to 'lib/bundler/runtime.rb')
-rw-r--r-- | lib/bundler/runtime.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb index 283a52f1..1a29edb5 100644 --- a/lib/bundler/runtime.rb +++ b/lib/bundler/runtime.rb @@ -44,6 +44,15 @@ module Bundler Bundler.ui.info("The bundle is now unlocked. The dependencies may be changed.") end + def lock + Bundler.ui.info("The bundle is already locked, relocking.") if locked? + sources.each { |s| s.lock if s.respond_to?(:lock) } + FileUtils.mkdir_p("#{root}/.bundle") + write_yml_lock + write_rb_lock + Bundler.ui.info("The bundle is now locked. Use `bundle show` to list the gems in the environment.") + end + def locked? File.exist?("#{root}/Gemfile.lock") end |