disable errexit when inside EXIT trap
We need to turn off errexit in the EXIT trap otherwise we break out if it early. Rookie mistake, and prevents the rest of the debug from happening. Change-Id: Ida7e277dd1693a6c594b2f721ddf15c9a169f07b
This commit is contained in:
parent
e3c883f1ba
commit
f84db387fd
@ -92,8 +92,15 @@ function exit_trap {
|
||||
# really important that this is the *first* line in this
|
||||
# function, otherwise we corrupt the exit code
|
||||
local r=$?
|
||||
|
||||
# we don't need tracing during this
|
||||
set +o xtrace
|
||||
|
||||
# we have to turn off errexit at this point, otherwise we're going
|
||||
# to exit from this function early when the while caller ends
|
||||
# (with a bad exit)
|
||||
set +o errexit
|
||||
|
||||
if [[ $r -ne 0 ]]; then
|
||||
# unwind the call stack on failures
|
||||
local frame=0
|
||||
|
Loading…
x
Reference in New Issue
Block a user