summaryrefslogtreecommitdiff
path: root/lib/bundler/definition.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-01-04 10:11:34 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-01-04 13:14:43 +0900
commit69ed64949b0c02d4b195809fa104ff23dd100093 (patch)
treec07abfd061a2da7610e252960c06a64e8b17e6c3 /lib/bundler/definition.rb
parent5537adf719a37a30b17d39111cc03700f353aa2d (diff)
downloadruby-69ed64949b0c02d4b195809fa104ff23dd100093.tar.gz
Track Bundler master(2.3.0.dev) branch at 55634a8af18a52df86c4275d70fa1179118bcc20
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r--lib/bundler/definition.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index b22363d119..349fa632a0 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -7,6 +7,11 @@ module Bundler
class Definition
include GemHelpers
+ class << self
+ # Do not create or modify a lockfile (Makes #lock a noop)
+ attr_accessor :no_lock
+ end
+
attr_reader(
:dependencies,
:locked_deps,
@@ -336,6 +341,8 @@ module Bundler
end
def lock(file, preserve_unknown_sections = false)
+ return if Definition.no_lock
+
contents = to_lock
# Convert to \r\n if the existing lock has them