Skip to content

fix(interpreter): contain ${var:?msg} error within subshell boundary#1031

Merged
chaliy merged 1 commit intomainfrom
fix/issue-961-subshell-param-error
Apr 3, 2026
Merged

fix(interpreter): contain ${var:?msg} error within subshell boundary#1031
chaliy merged 1 commit intomainfrom
fix/issue-961-subshell-param-error

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 3, 2026

Summary

  • ${var:?msg} errors used ControlFlow::Return which propagated through the subshell boundary, killing the parent shell
  • Now both ControlFlow::Exit and ControlFlow::Return are consumed at the subshell boundary, matching real bash behavior

Test plan

  • parameter_error_in_subshell_contained — verifies parent shell survives ${var:?msg} in subshell
  • Smoke test via CLI confirms end-to-end behavior
  • All existing tests pass (199 tests, full suite)

Closes #961

@chaliy chaliy merged commit 44309c7 into main Apr 3, 2026
27 checks passed
@chaliy chaliy deleted the fix/issue-961-subshell-param-error branch April 3, 2026 02:48
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.

${var:?msg} error in subshell kills parent shell instead of just the subshell

1 participant