-
Notifications
You must be signed in to change notification settings - Fork 304
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
Setting "workspaceFolder" to "${localWorkspaceFolder}" at devcontainer.json fails on Windows #4506
Comments
OK I saw a couple of articles suggesting opening Code FROM WSL (and looks like something is in the works with #4454), so this issue could be worked around... However, with WSL there's another issue... |
Why do you want the local and container paths to match? Using WSL2 might indeed be an option to avoid the Windows path. This should already work, have you tried? |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
@chrmarti I tried it, and yielded better results, but then I got across another problem with that approach... I'll see if I can create another issue with that. |
@chrmarti I need the paths to match, because I'm launching other containers from within the first one (I have the docker client installed in the first container, and sharing the docker socket), and the child containers must have a subfolder within the first container... I can't do that the way I need to if I can't make the paths match. See #4647 |
Marking as feature request. It might be best to retry WSL once I have the fix for that published. |
Currently, I have this in my
.devcontainer.json
:And this in
my-compose.yml
:This works great on macOS and Linux boxes. However, if I try to open the same project in Windows, this same setup fails:
I think I know what's happening: While on macOS and Linux,
${localWorkspaceFolder}
is going to contain a Unix style path, on Windows it will contain a Windows style path, such asC:\Users\myself\Documents\my-app
... The thing is, looks like there's no way to fallback to something that works for macOS, Windows and Linux.I didn't know how to report this (should I open one or several feature requests?), so I decided to go reporting the broken behavior first. But I think this can be worked around if two things happen:
${localWorkspaceFolder}
in the style of the container's OS - maybe${localWorkspaceFolderForContainerOS}
?workspaceFolder
like this:My system info:
Steps to Reproduce:
Other info
Does this issue occur when you try this locally?: Does not apply (remote containers required)
Does this issue occur when you try this locally and all extensions are disabled?: Does not apply (remote containers extension required)
The text was updated successfully, but these errors were encountered: