ruby-changes:61346
From: Nobuyoshi <ko1@a...>
Date: Sat, 23 May 2020 14:56:34 +0900 (JST)
Subject: [ruby-changes:61346] 0b2fc4cf37 (master): extlibs.rb: make symlink only if the target exists
https://git.ruby-lang.org/ruby.git/commit/?id=0b2fc4cf37 From 0b2fc4cf379dec82290c5bc9cc71ce8dc4e4f28b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 23 May 2020 14:56:13 +0900 Subject: extlibs.rb: make symlink only if the target exists diff --git a/tool/extlibs.rb b/tool/extlibs.rb index 33462ce..720f1c7 100755 --- a/tool/extlibs.rb +++ b/tool/extlibs.rb @@ -99,6 +99,7 @@ class ExtLibs https://github.com/ruby/ruby/blob/trunk/tool/extlibs.rb#L99 if (target = src).start_with?("/") target = File.join([".."] * file.count("/"), src) end + return unless File.exist?(File.expand_path(target, File.dirname(file))) File.unlink(file) rescue nil begin File.symlink(target, file) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/