aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-19 11:53:13 -0500
committerCraig Jennings <c@cjennings.net>2026-05-19 11:53:13 -0500
commit7e5651e3b074366ab35321b550ac06f1823b0b3d (patch)
tree9f22935be52ede4dd0ccb07c704eb8609597dd2c /tests
parentac16b333f90aba904611be6c5202cdeb0b07546e (diff)
downloadarchsetup-7e5651e3b074366ab35321b550ac06f1823b0b3d.tar.gz
archsetup-7e5651e3b074366ab35321b550ac06f1823b0b3d.zip
fix(archsetup): log the real exit code from failed installs
`retry_install` was logging "error code: 0" for every retry-exhausted install (6 AUR packages on the 2026-05-16 run, 2 on the 2026-05-18 run). Root cause: `last_exit_code=$?` ran AFTER an `if eval ...; then return 0; fi` block. Bash defines an if-compound's exit status as zero when no condition tested true. With no else clause and a failing eval, that's exactly what happens, so `$?` captures 0 instead of eval's actual exit code. Now eval runs unconditionally, `$?` lands in `last_exit_code` right after it, and the if just compares against the captured value. Same control flow, accurate codes in the summary. Verified with a small bash test: the old pattern reports `$?=0` after a failing if, the new pattern reports the real exit.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions