1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

extlibs.rb: make patch command selectable [ci skip]

Some Windows ports fail an assertion on patch files with LF EOL
code.  MSys2 patch.exe 2.7.6 seems fine, at least.
This commit is contained in:
Nobuyoshi Nakada 2021-01-15 09:32:35 +09:00
parent 0a039c5fbb
commit eb4319beaf
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -90,7 +90,7 @@ class ExtLibs
$stdout.puts "applying #{patch} under #{dest}"
$stdout.flush
end
Process.wait(Process.spawn("patch", "-d", dest, "-i", patch, *args))
Process.wait(Process.spawn(ENV.fetch("PATCH", "patch"), "-d", dest, "-i", patch, *args))
$?.success? or raise "failed to patch #{patch}"
end