Skip to content
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

Dev Container fails when launched from Windows #4325

Closed
marrobi opened this issue Feb 6, 2025 · 1 comment · Fixed by #4327
Closed

Dev Container fails when launched from Windows #4325

marrobi opened this issue Feb 6, 2025 · 1 comment · Fixed by #4327

Comments

@marrobi
Copy link
Member

marrobi commented Feb 6, 2025

getting the following after pulling this change:

image

It appears to be trying to run initializeCommand on the Windows command line, rather than Bash.

Originally posted by @jonnyry in #4290 (comment)

@marrobi
Copy link
Member Author

marrobi commented Feb 6, 2025

From : microsoft/vscode-remote-release#4568 (comment)

We need to create two scripts, as per:

Have devcontainer.json with an "initializeCommand" using the property's array syntax (first element is the command or script, remaining elements are parameters to it) to run a script in the workspace. The path to the script should use slashes (not backslashes) to be portable and there should be a file with that exact name and the executable bit set for Linux/MacOS and a file with that name and .cmd or .bat as extension for Windows. This setup should be the same independent of the OS you test on.

marrobi added a commit that referenced this issue Feb 6, 2025
Fixes #4325

Add platform-specific initialization scripts for dev container.

* **Add `initialize.sh` script**: Create directories `.azure` and `.config` in the user's home directory using Bash.
* **Add `initialize.cmd` script**: Create directories `.azure` and `.config` in the user's profile directory using Windows command line.
* **Update `initializeCommand` in `devcontainer.json`**: Use array syntax to reference the new platform-specific initialization scripts.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/AzureTRE/issues/4325?shareId=XXXX-XXXX-XXXX-XXXX).
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 a pull request may close this issue.

1 participant