summaryrefslogtreecommitdiff
path: root/lib/bundler/runtime.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-03-31 13:17:07 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-04-03 20:57:19 -0500
commit6e25694cafeb697c200d981d5bced45e8b693cca (patch)
treef5010b02e9b8171994aad8f4b5eae7ea684f6c90 /lib/bundler/runtime.rb
parentc91e77cab2d29f3e0ecb721430ee93c7c86f0859 (diff)
downloadbundler-6e25694cafeb697c200d981d5bced45e8b693cca.tar.gz
[Runtime] Avoid re-locking when not unlocking and nothing has changed
Diffstat (limited to 'lib/bundler/runtime.rb')
-rw-r--r--lib/bundler/runtime.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index fdd3d227e3..6ccb0d89b5 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -127,6 +127,7 @@ module Bundler
definition_method :requires
def lock(opts = {})
+ return if @definition.nothing_changed? && !@definition.unlocking?
@definition.lock(Bundler.default_lockfile, opts[:preserve_unknown_sections])
end