Commit 44309c7
authored
fix(interpreter): contain ${var:?msg} error within subshell boundary (#1031)
## 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
- [x] `parameter_error_in_subshell_contained` — verifies parent shell
survives `${var:?msg}` in subshell
- [x] Smoke test via CLI confirms end-to-end behavior
- [x] All existing tests pass (199 tests, full suite)
Closes #9611 parent 84f0f4a commit 44309c7
File tree
2 files changed
+19
-7
lines changed- crates/bashkit
- src/interpreter
- tests/spec_cases/bash
2 files changed
+19
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1438 | 1438 | | |
1439 | 1439 | | |
1440 | 1440 | | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
1448 | 1452 | | |
1449 | 1453 | | |
1450 | 1454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
0 commit comments