Skip to content

fix(interpreter): exec < file redirects stdin for subsequent commands#1030

Merged
chaliy merged 1 commit intomainfrom
fix/issue-960-exec-stdin-redirect
Apr 3, 2026
Merged

fix(interpreter): exec < file redirects stdin for subsequent commands#1030
chaliy merged 1 commit intomainfrom
fix/issue-960-exec-stdin-redirect

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 3, 2026

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

  • exec_stdin_redirect spec test — exec < file + read reads from file
  • Smoke test via CLI confirms end-to-end behavior
  • All existing exec and bash spec tests still pass

Closes #960

@chaliy chaliy merged commit 84f0f4a into main Apr 3, 2026
27 checks passed
@chaliy chaliy deleted the fix/issue-960-exec-stdin-redirect branch April 3, 2026 02:33
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.

exec < file does not redirect stdin for subsequent commands

1 participant