зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Refactor: Move filesystem access into Definition class
https://github.com/rubygems/rubygems/commit/2720da2659
This commit is contained in:
Родитель
0ec88b54f3
Коммит
0653fb026c
|
@ -64,7 +64,6 @@ module Bundler
|
|||
file = file ? File.expand_path(file) : Bundler.default_lockfile
|
||||
puts "Writing lockfile to #{file}"
|
||||
definition.lock(file)
|
||||
FileUtils.touch(file)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -342,7 +342,10 @@ module Bundler
|
|||
|
||||
preserve_unknown_sections ||= !updating_major && (Bundler.frozen_bundle? || !(unlocking? || @unlocking_bundler))
|
||||
|
||||
return if file && File.exist?(file) && lockfiles_equal?(@lockfile_contents, contents, preserve_unknown_sections)
|
||||
if file && File.exist?(file) && lockfiles_equal?(@lockfile_contents, contents, preserve_unknown_sections)
|
||||
FileUtils.touch(file)
|
||||
return
|
||||
end
|
||||
|
||||
if Bundler.frozen_bundle?
|
||||
Bundler.ui.error "Cannot write a changed lockfile while frozen."
|
||||
|
|
Загрузка…
Ссылка в новой задаче