[前][次][番号順一覧][スレッド一覧]

ruby-changes:46726

From: nobu <ko1@a...>
Date: Mon, 22 May 2017 13:10:56 +0900 (JST)
Subject: [ruby-changes:46726] nobu:r58843 (trunk): downloader.rb: true symlink on cygwin

nobu	2017-05-22 13:10:51 +0900 (Mon, 22 May 2017)

  New Revision: 58843

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58843

  Log:
    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.

  Modified files:
    trunk/tool/downloader.rb
Index: tool/downloader.rb
===================================================================
--- tool/downloader.rb	(revision 58842)
+++ tool/downloader.rb	(revision 58843)
@@ -225,15 +225,17 @@ class Downloader https://github.com/ruby/ruby/blob/trunk/tool/downloader.rb#L225
   def self.link_cache(cache, file, name, verbose = false)
     return false unless cache and cache.exist?
     return true if cache.eql?(file)
-    begin
-      file.make_symlink(cache.relative_path_from(file.parent))
-    rescue SystemCallError
-    else
-      if verbose
-        $stdout.puts "made symlink #{name} to #{cache}"
-        $stdout.flush
+    if /cygwin/ !~ RUBY_PLATFORM or /winsymlink:nativestrict/ =~ ENV['CYGWIN']
+      begin
+        file.make_symlink(cache.relative_path_from(file.parent))
+      rescue SystemCallError
+      else
+        if verbose
+          $stdout.puts "made symlink #{name} to #{cache}"
+          $stdout.flush
+        end
+        return true
       end
-      return true
     end
     begin
       file.make_link(cache)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]