Skip to content

feat(interpreter): exec with command argument — execute and don't return#815

Merged
chaliy merged 1 commit intomainfrom
fix/issue-794-exec-command
Mar 26, 2026
Merged

feat(interpreter): exec with command argument — execute and don't return#815
chaliy merged 1 commit intomainfrom
fix/issue-794-exec-command

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Mar 26, 2026

Summary\n\n- exec cmd args... now resolves and executes the command, then exits the current script/shell with its exit code\n- Subsequent statements after exec are not executed (uses ControlFlow::Return)\n- FD-only exec (no command) continues to work as before\n\nCloses #794\nCloses #797\n\n## Test plan\n\n- [x] exec replaces execution (subsequent statements skipped)\n- [x] exec propagates exit code\n- [x] exec with builtin command\n- [x] exec passes arguments\n- [x] exec FD redirections still work\n- [x] cargo test --all-features green\n- [x] cargo clippy and cargo fmt clean

@chaliy chaliy force-pushed the fix/issue-794-exec-command branch 3 times, most recently from db1300d to 1d37fcf Compare March 26, 2026 06:28
exec cmd args... now resolves and executes the command, then exits the
current script/shell with its exit code. Subsequent statements are not
executed. FD-only exec (no command) continues to work as before.

Closes #794
Closes #797
@chaliy chaliy force-pushed the fix/issue-794-exec-command branch from 1d37fcf to 526eb03 Compare March 26, 2026 06:36
@chaliy chaliy merged commit 31b76b0 into main Mar 26, 2026
18 of 23 checks passed
@chaliy chaliy deleted the fix/issue-794-exec-command branch March 26, 2026 06:44
chaliy added a commit that referenced this pull request Mar 26, 2026
PR #815 made `exec cmd` run within VFS sandbox instead of blocking.
The JS security test still expected `exec ls` to fail, but `ls` is a
builtin that succeeds in the sandbox. Changed to test `exec /bin/bash`
which correctly fails (external binary not in VFS).
chaliy added a commit that referenced this pull request Mar 26, 2026
PR #815 made `exec cmd` run within VFS sandbox instead of blocking.
The JS security test still expected `exec ls` to fail, but `ls` is a
builtin that succeeds in the sandbox. Changed to test `exec /bin/bash`
which correctly fails (external binary not in VFS).
chaliy added a commit that referenced this pull request Mar 26, 2026
PR #815 made `exec cmd` run within VFS sandbox instead of blocking.
The JS security test still expected `exec ls` to fail, but `ls` is a
builtin that succeeds in the sandbox. Changed to test `exec /bin/bash`
which correctly fails (external binary not in VFS).
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.

1 participant