Commit 84f0f4a
authored
fix(interpreter): exec < file redirects stdin for subsequent commands (#1030)
## Summary
- When `exec < file` has no explicit fd, set `pipeline_stdin` to the
file content so subsequent `read`/`cat` commands consume it
- Hoisted file-reading logic out of the fd check to share between
named-fd and default-stdin paths
## Test plan
- [x] `exec_stdin_redirect` spec test — `exec < file` + `read` reads
from file
- [x] Smoke test via CLI confirms end-to-end behavior
- [x] All existing exec and bash spec tests still pass
Closes #9601 parent d3521e6 commit 84f0f4a
File tree
2 files changed
+17
-4
lines changed- crates/bashkit
- src/interpreter
- tests/spec_cases/bash
2 files changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3643 | 3643 | | |
3644 | 3644 | | |
3645 | 3645 | | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
3646 | 3650 | | |
3647 | | - | |
3648 | | - | |
3649 | | - | |
3650 | | - | |
3651 | 3651 | | |
3652 | 3652 | | |
3653 | 3653 | | |
| 3654 | + | |
| 3655 | + | |
| 3656 | + | |
3654 | 3657 | | |
3655 | 3658 | | |
3656 | 3659 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
0 commit comments