build system: output error if command to execute isn't found

This commit is contained in:
Moritz Bunkus 2018-01-21 12:48:15 +01:00
parent 6e89cbc05d
commit de37cf3418
2 changed files with 11 additions and 1 deletions

View File

@ -16,6 +16,8 @@
bytes, not the encoded (compressed) number of bytes. Fixes #2200.
* mkvinfo: Windows: line endings will be written as `\r\n` (carriage return &
line feed) again instead of just `\n` (line feed).
* build system: an error message is output if a command to execute is not
found instead of silently failing.
# Version 20.0.0 "I Am The Sun" 2018-01-15

View File

@ -94,7 +94,15 @@ def runq(action, target, cmdline, options = {})
puts_action action, :target => target, :prefix => sprintf("[%s %02d:%02d.%03d]", code == 0 ? "done" : "fail", (duration / 60).to_i, duration.to_i % 60, (duration * 1000).to_i % 1000)
end
exit code if (code != 0) && !options[:allow_failure].to_bool
if (code != 0) && !options[:allow_failure].to_bool
if code == 127
puts "Error: command not found: #{cmdline}"
elsif code == -1
puts "Error: could not create child process for: #{cmdline}"
end
exit code
end
end
def runq_git(msg, cmdline, options = {})