mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
bundle/commands/exec: fix exit code handling.
In some `brew tests` runs, `$CHILD_STATUS` can be `nil`. Let's handle this and avoid these flaky tests.
This commit is contained in:
parent
8b32d019d4
commit
e8e8fcea02
@ -178,7 +178,9 @@ module Homebrew
|
||||
exit_code = 0
|
||||
run_services(@dsl.entries) do
|
||||
Kernel.system(*args)
|
||||
exit_code = $CHILD_STATUS.exitstatus
|
||||
if (system_exit_code = $CHILD_STATUS&.exitstatus)
|
||||
exit_code = system_exit_code
|
||||
end
|
||||
end
|
||||
exit!(exit_code)
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user