build: Propagate entire ErrorDuringExecution
Fixes https://github.com/Homebrew/brew/issues/5427.
This commit is contained in:
parent
a7832280c9
commit
b7d84f2d9e
@ -202,6 +202,10 @@ rescue Exception => e # rubocop:disable Lint/RescueException
|
|||||||
error_hash["cmd"] = e.cmd
|
error_hash["cmd"] = e.cmd
|
||||||
error_hash["args"] = e.args
|
error_hash["args"] = e.args
|
||||||
error_hash["env"] = e.env
|
error_hash["env"] = e.env
|
||||||
|
elsif error_hash["json_class"] = "ErrorDuringExecution"
|
||||||
|
error_hash["cmd"] = e.cmd
|
||||||
|
error_hash["status"] = e.status.exitstatus
|
||||||
|
error_hash["output"] = e.output
|
||||||
end
|
end
|
||||||
|
|
||||||
error_pipe.puts error_hash.to_json
|
error_pipe.puts error_hash.to_json
|
||||||
|
|||||||
@ -300,7 +300,7 @@ end
|
|||||||
def safe_system(cmd, *args, **options)
|
def safe_system(cmd, *args, **options)
|
||||||
return if Homebrew.system(cmd, *args, **options)
|
return if Homebrew.system(cmd, *args, **options)
|
||||||
|
|
||||||
raise(ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS))
|
raise ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Prints no output
|
# Prints no output
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user