utils/fork: check for inner exception command.
If it's not present then `ErrorDuringExecution` and `BuildError` don't work correctly so better to fall back to a default `RuntimeError`.
This commit is contained in:
parent
fdbf935364
commit
84a110744a
@ -5,11 +5,13 @@ require "socket"
|
||||
|
||||
module Utils
|
||||
def self.rewrite_child_error(child_error)
|
||||
error = if child_error.inner_class == ErrorDuringExecution
|
||||
error = if child_error.inner["cmd"] &&
|
||||
child_error.inner_class == ErrorDuringExecution
|
||||
ErrorDuringExecution.new(child_error.inner["cmd"],
|
||||
status: child_error.inner["status"],
|
||||
output: child_error.inner["output"])
|
||||
elsif child_error.inner_class == BuildError
|
||||
elsif child_error.inner["cmd"] &&
|
||||
child_error.inner_class == BuildError
|
||||
# We fill `BuildError#formula` and `BuildError#options` in later,
|
||||
# when we rescue this in `FormulaInstaller#build`.
|
||||
BuildError.new(nil, child_error.inner["cmd"],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user