Commit 577e653
committed
CI: Fix ARM64 install script exit code handling
The run-on-arch-action captures the shell's final exit code ($?), which can
remain non-zero even after successful package installation due to 'set +e'
context used for error-tolerant apt operations.
The install script properly handles dep11 metadata failures (retries for
critical indices, ignores dep11, verifies package installation), but the
shell retains the last command's exit status in the 'set +e' region.
Root cause: Shell exit code propagation in 'set +e' context
- 'set +e' disables errexit, allowing commands to fail without stopping
- Failed commands still set $? to non-zero
- Without explicit success command, shell exits with last command's $?
- run-on-arch-action interprets non-zero $? as failure
Fix: Re-enable errexit after verification and execute 'true' to guarantee
clean exit status. This is more explicit than 'exit 0' and documents why
we need the exit code reset.
Alternative considered: 'exit 0' (simpler but less clear about intent)
Chosen approach: 'set -e; true' (explicit about re-enabling error checking)
Fixes: host-arm64 "exit code 100" despite successful package installation1 parent 57d960a commit 577e653
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
434 | 439 | | |
435 | 440 | | |
436 | 441 | | |
| |||
0 commit comments