-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows initializeCommand not using default shell #986
Labels
Comments
Hey @martinbiard, thanks for opening the issue. Seems like you've hit a blind spot of DevPod, we'll fix that |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
On Windows, when using an
initializeCommand
, it always tries to execute by running it throughsh -c ...
.I wanted to use a common technique to invoke a script in a cross platform compatible way i.e. you name your scripts as follows:
Then, in
devcontainer.json
, you set yourinitializeCommand
simply tomyscript
such that on linux shells it will executemyscript
and on Windows it will executemyscript.cmd
from which you can then pass ontomyscript.ps1
.What did you expect to happen instead?
I expected the
initializeCommand
to be invoked through the OS default shell.How can we reproduce the bug? (as minimally and precisely as possible)
My
devcontainer.json
:This is the default config from
microsoft/vscode-remote-try-node
with only addedinitializeCommand
at the end.Logs:
Local Environment:
DevPod Provider:
Anything else we need to know?
The only little workaround I have for now is adding
C:\Program Files\Git\bin
to my PATH to makesh.exe
available, but Git does not add this directory to the PATH by default on Windows (it addsC:\Program Files\Git\cmd
which doesn't contain sh.exe). Also, this workaround is not great because what I really want is access to powershell.From the devcontainer documentation, you would expect that by saying clearly that it runs the
initializeCommand
on the host, that it would use the host's native shell. Then, if you really rather use somesh.exe
, you can just call it from the native shell.The text was updated successfully, but these errors were encountered: