Commit 33494d7
Propagate shapepipe_run's exit code (main must return run's value)
`main()` called `run(args)` but discarded its return value, so `exit(main())`
was always `exit(None)` → 0. `run()` returns 1 when it catches an error
(`catch_error` + `return 1`), so *every* handled failure has been exiting 0 —
invisible to `exit $?` in the job scripts and to any CI/automation. One-word
fix: `return run(args)`. Add a regression test that main forwards run's value.
Surfaced while end-to-end testing the MPI singleton guard: the guard fired and
logged loudly but the job still exited 0 until this fix.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e82de0e commit 33494d7
2 files changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
0 commit comments