check this run: https://github.com/entireio/cli/actions/runs/24329879507
- User
check this run: https://github.com/entireio/cli/actions/runs/24329879507
Assistant· claude-opus-4-6
Found it. Script prints "Nightly tag already exists for commit 3c6b56a7, skipping." and exits with code 2. Workflow step catches exit code 2 and echoes "Skipping" — but problem is
bash -ekills the script before theEXIT_CODE=$?check runs.Let me look at workflow file.
Assistant· claude-opus-4-6
Yep. Problem is clear.
bash -e(fromshell: /usr/bin/bash -e {0}— GitHub Actions default). Whencreate-nightly-tag.shexits 2,bash -eimmediately aborts beforeEXIT_CODE=$?runs. So exit code 2 propagates as step failure.Fix: capture exit code on same line using
|| trueto preventbash -efrom aborting.Assistant· claude-opus-4-6
Good, confirmed. Script exits 2 for "already exists" case. Workflow tries to catch it but
bash -ekills it first.Fix:
- User
[Request interrupted by user for tool use]
- User
is there any way to not exit on error?
Assistant· claude-opus-4-6
Few options in GitHub Actions:
shell: bash {0}— removes-eflag entirely (what I just tried, you rejected)|| truepattern —TAG=$(scripts/create-nightly-tag.sh) || truethen check$?won't work since|| trueresets$?- Capture inline —
TAG=$(scripts/create-nightly-tag.sh) && RC=0 || RC=$?— captures exit code before-ekills the shell set +einside run block — addset +eat top of run block to locally disable errexit
Option 3 or 4 are cleanest. Which do you prefer?
- User
3
Assistant· claude-opus-4-6
Done. Now when script exits 2,
EXIT_CODEcaptures it and flow continues to theifcheck instead ofbash -eaborting.- User
ship it
Assistant· claude-opus-4-6
One file changed. Need a branch first — can't push directly to main.