Skip to content

fix(interpreter): preserve executable script exit status#298

Open
skovranek wants to merge 1 commit into
vercel-labs:mainfrom
skovranek:fix-executable-script-exit
Open

fix(interpreter): preserve executable script exit status#298
skovranek wants to merge 1 commit into
vercel-labs:mainfrom
skovranek:fix-executable-script-exit

Conversation

@skovranek

Copy link
Copy Markdown
Contributor

Summary

  • return an executable script's exit status to its parent command list
  • add regression coverage for ; and && after executable scripts exit nonzero

Why

Executable scripts run in a subshell-like context, but their internal ExitError was rethrown after the script state was restored. That terminated the surrounding command list, so:

./fail.sh ; echo $?

never reached echo.

The script boundary now converts ExitError into a normal command result. This preserves the exit status while allowing the parent list to apply standard ; and && behavior.

## Verification

- pnpm vitest run src/interpreter/executable-script.test.ts

@skovranek
skovranek requested a review from cramforce as a code owner July 13, 2026 21:57
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

@skovranek is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@cramforce

Copy link
Copy Markdown
Contributor

Looks good. Take a look at the CI runs

@skovranek
skovranek force-pushed the fix-executable-script-exit branch from cc130ca to 4db76da Compare July 16, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants