зеркало из https://github.com/github/ruby.git
downloader.rb: true symlink on cygwin
* tool/downloader.rb (Downloader.link_cache): on Cygwin, make true symlink only, which is provided by the OS. as mingw/mswin ruby can't follow cygwin's pseudo symlink, it will fail on the same source tree. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
72fb1e1690
Коммит
c45a52af36
|
@ -225,6 +225,7 @@ class Downloader
|
|||
def self.link_cache(cache, file, name, verbose = false)
|
||||
return false unless cache and cache.exist?
|
||||
return true if cache.eql?(file)
|
||||
if /cygwin/ !~ RUBY_PLATFORM or /winsymlink:nativestrict/ =~ ENV['CYGWIN']
|
||||
begin
|
||||
file.make_symlink(cache.relative_path_from(file.parent))
|
||||
rescue SystemCallError
|
||||
|
@ -235,6 +236,7 @@ class Downloader
|
|||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
begin
|
||||
file.make_link(cache)
|
||||
rescue SystemCallError
|
||||
|
|
Загрузка…
Ссылка в новой задаче