lib/bundler/definition.rb in bundler-2.4.13 vs lib/bundler/definition.rb in bundler-2.4.14
- old
+ new
@@ -215,10 +215,11 @@
Bundler.ui.debug "The definition is missing #{missing.map(&:full_name)}"
true
rescue BundlerError => e
@resolve = nil
@resolver = nil
+ @resolution_packages = nil
@specs = nil
@gem_version_promoter = nil
Bundler.ui.debug "The definition is missing dependencies, failed to resolve & materialize locally (#{e})"
true
@@ -359,14 +360,12 @@
msg << "You are trying to install in deployment mode after changing\n" \
"your Gemfile. Run `bundle install` elsewhere and add the\n" \
"updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control."
unless explicit_flag
- suggested_command = if Bundler.settings.locations("frozen").keys.&([:global, :local]).any?
- "bundle config unset frozen"
- elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
- "bundle config unset deployment"
+ suggested_command = unless Bundler.settings.locations("frozen").keys.include?(:env)
+ "bundle config set frozen false"
end
msg << "\n\nIf this is a development machine, remove the #{Bundler.default_gemfile} " \
"freeze \nby running `#{suggested_command}`." if suggested_command
end
@@ -884,10 +883,11 @@
def lockfiles_equal?(current, proposed, preserve_unknown_sections)
if preserve_unknown_sections
sections_to_ignore = LockfileParser.sections_to_ignore(@locked_bundler_version)
sections_to_ignore += LockfileParser.unknown_sections_in_lockfile(current)
- sections_to_ignore += LockfileParser::ENVIRONMENT_VERSION_SECTIONS
+ sections_to_ignore << LockfileParser::RUBY
+ sections_to_ignore << LockfileParser::BUNDLED unless @unlocking_bundler
pattern = /#{Regexp.union(sections_to_ignore)}\n(\s{2,}.*\n)+/
whitespace_cleanup = /\n{2,}/
current = current.gsub(pattern, "\n").gsub(whitespace_cleanup, "\n\n").strip
proposed = proposed.gsub(pattern, "\n").gsub(whitespace_cleanup, "\n\n").strip
end