Run string-form dev container lifecycle commands in /bin/sh -c#60792
Run string-form dev container lifecycle commands in /bin/sh -c#60792rabindra789 wants to merge 3 commits into
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @rabindra789 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @rabindra789 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
We require contributors to sign our Contributor License Agreement, and we don't have @rabindra789 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@rabindra789 |
Objective
Fixes #60228.
String-form dev container lifecycle commands are currently executed by
splitting the command on spaces and running the first token directly.
This means shell features such as variable expansion, pipes,
redirection, and command chaining do not work.
According to the Dev Container specification, string-form lifecycle
commands should run through
/bin/sh -c, while array-form commandsshould continue to execute directly.
Solution
LifecycleScript::shell_command()to wrap string-form commands in/bin/sh -c.shell_command()instead of splitting on spaces.Testing
cargo test -p dev_container(107 tests passed)./bin/sh -c.Self-Review Checklist
Release Notes:
/bin/sh -cas required by the Dev Container specification.