Merge pull request #10160 from MikeMcQuaid/exitstatus
exceptions: fix ErrorDuringExecution status.
This commit is contained in:
commit
4611266f08
@ -582,7 +582,7 @@ class ErrorDuringExecution < RuntimeError
|
|||||||
when Integer
|
when Integer
|
||||||
status
|
status
|
||||||
else
|
else
|
||||||
status.exitstatus
|
status&.exitstatus
|
||||||
end
|
end
|
||||||
|
|
||||||
redacted_cmd = redact_secrets(cmd.shelljoin.gsub('\=', "="), secrets)
|
redacted_cmd = redact_secrets(cmd.shelljoin.gsub('\=', "="), secrets)
|
||||||
@ -592,7 +592,7 @@ class ErrorDuringExecution < RuntimeError
|
|||||||
elsif (uncaught_signal = status.termsig)
|
elsif (uncaught_signal = status.termsig)
|
||||||
"was terminated by uncaught signal #{Signal.signame(uncaught_signal)}"
|
"was terminated by uncaught signal #{Signal.signame(uncaught_signal)}"
|
||||||
else
|
else
|
||||||
raise ArgumentError, "Status does neither have `exitstatus` nor `termsig`."
|
raise ArgumentError, "Status neither has `exitstatus` nor `termsig`."
|
||||||
end
|
end
|
||||||
|
|
||||||
s = +"Failure while executing; `#{redacted_cmd}` #{reason}."
|
s = +"Failure while executing; `#{redacted_cmd}` #{reason}."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user