lib/bundler/cli.rb in bundler-0.9.0 vs lib/bundler/cli.rb in bundler-0.9.1.pre1

- old
+ new

@@ -54,9 +54,14 @@ Installer.install(Bundler.root, Bundler.definition, opts) end desc "lock", "Locks the bundle to the current set of dependencies, including all child dependencies." def lock + if File.exist?("#{Bundler.root}/Gemfile.lock") + Bundler.ui.info("The bundle is already locked, relocking.") + `rm #{Bundler.root}/Gemfile.lock` + end + environment = Bundler.load environment.lock end desc "unlock", "Unlock the bundle. This allows gem versions to be changed"