summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/lock.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/cli/lock.rb')
-rw-r--r--lib/bundler/cli/lock.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bundler/cli/lock.rb b/lib/bundler/cli/lock.rb
index beeb2e4633..223db9419f 100644
--- a/lib/bundler/cli/lock.rb
+++ b/lib/bundler/cli/lock.rb
@@ -22,7 +22,10 @@ module Bundler
Bundler::Fetcher.disable_endpoint = options["full-index"]
update = options[:update]
- update = { :gems => update, :lock_shared_dependencies => options[:conservative] } if update.is_a?(Array)
+ if update.is_a?(Array) # unlocking specific gems
+ Bundler::CLI::Common.ensure_all_gems_in_lockfile!(update)
+ update = { :gems => update, :lock_shared_dependencies => options[:conservative] }
+ end
definition = Bundler.definition(update)
Bundler::CLI::Common.configure_gem_version_promoter(Bundler.definition, options) if options[:update]