Skip to content

Commit 901471a

Browse files
committed
[Bug #18623] Link only existing excutables to make runnable [ci skip]
1 parent 81e274c commit 901471a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tool/mkrunnable.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def ln_relative(src, dest, executable = false)
9393
return if File.identical?(src, dest)
9494
parent = File.dirname(dest)
9595
File.directory?(parent) or mkdir_p(parent)
96-
return ln_exe(src, dest) if executable
96+
if executable
97+
return (ln_exe(src, dest) if File.exist?(src))
98+
end
9799
clean_link(relative_path_from(src, parent), dest) {|s, d| ln_safe(s, d)}
98100
end
99101

0 commit comments

Comments
 (0)