diff options
author | Agrim Mittal <agrimmittal97@gmail.com> | 2018-04-05 20:06:54 +0530 |
---|---|---|
committer | Agrim Mittal <agrimmittal97@gmail.com> | 2018-04-07 09:38:06 +0530 |
commit | a3fbedc2d02c8f6b6d7281c7659f28be9d89dfee (patch) | |
tree | e85a6eeb654db9f3f029b6ddd25a925a5945a16a /lib/bundler/definition.rb | |
parent | 257fb54da0003c3a67f6e7b3b5a242a4ba9c45cb (diff) | |
download | bundler-a3fbedc2d02c8f6b6d7281c7659f28be9d89dfee.tar.gz |
Fix bundle lock when default gemfile is present
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r-- | lib/bundler/definition.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 91d34ad150..bec3cadbb4 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -337,7 +337,8 @@ module Bundler end preserve_unknown_sections ||= !updating_major && (Bundler.frozen_bundle? || !(unlocking? || @unlocking_bundler)) - return if lockfiles_equal?(@lockfile_contents, contents, preserve_unknown_sections) + + return if file && File.exist?(file) && lockfiles_equal?(@lockfile_contents, contents, preserve_unknown_sections) if Bundler.frozen_bundle? Bundler.ui.error "Cannot write a changed lockfile while frozen." |