[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:
parent
71bc999009
commit
ec5bde1a80
@ -781,7 +781,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|||||||
|
|
||||||
def self.open_with_flock(path, flags, &block)
|
def self.open_with_flock(path, flags, &block)
|
||||||
File.open(path, flags) do |io|
|
File.open(path, flags) do |io|
|
||||||
if !java_platform? && !solaris_platform?
|
if !java_platform? && win_platform?
|
||||||
begin
|
begin
|
||||||
io.flock(File::LOCK_EX)
|
io.flock(File::LOCK_EX)
|
||||||
rescue Errno::ENOSYS, Errno::ENOTSUP
|
rescue Errno::ENOSYS, Errno::ENOTSUP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user