зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Restrict `flock` to Windows
It was introduced to fix some race conditions there, but it doesn't seem necessary on other systems and it's actually causing issues there. https://github.com/rubygems/rubygems/commit/27b682c812
This commit is contained in:
Родитель
71bc999009
Коммит
ec5bde1a80
|
@ -781,7 +781,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|||
|
||||
def self.open_with_flock(path, flags, &block)
|
||||
File.open(path, flags) do |io|
|
||||
if !java_platform? && !solaris_platform?
|
||||
if !java_platform? && win_platform?
|
||||
begin
|
||||
io.flock(File::LOCK_EX)
|
||||
rescue Errno::ENOSYS, Errno::ENOTSUP
|
||||
|
|
Загрузка…
Ссылка в новой задаче