You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stop the Devcontainer Snippets Joining HOME and USERPROFILE Into an Invalid Mount Path on Windows #3852
Split from #1763 for the windows handoff lane, since this is the one part of that issue only a Windows host can verify.
Defect
Each bind mount source in catalog/snippets/devcontainer/python/devcontainer.json and catalog/snippets/devcontainer/dotnet/devcontainer.json joins ${localEnv:HOME}${localEnv:USERPROFILE}. That works while exactly one of the two is set. On a Windows host where both are set, for example VS Code launched from Git Bash, the join gives an invalid path such as C:\Users\x/c/Users/x/.ssh/..., and the container fails to start.
Why This Needs a Windows Host
The failure needs a Windows host environment holding both variables, VS Code, and a container runtime. A Linux host never sets USERPROFILE, and the hosted windows-latest job runs the unit suite and starts no devcontainer. So nothing but a Windows host can reproduce the failure or verify the fix.
Done When
A devcontainer built from each snippet starts on a Windows host with both variables set.
It still starts on a Windows host launched normally, with only USERPROFILE set.
It still starts on Linux, with only HOME set. This is the regression a Windows-only fix could cause.
Bounds
The rest of #1763 stays there: the mktemp -t template in post-create.sh, and the JSONC comment documenting the required host paths, which the maintainer chose in #3754. That comment sits beside the same mounts lines, so whichever change lands second rebases over the first.
Maintainer answer (2026-11-03): document the limit and close this issue, rather than moving the snippets to Compose.
devcontainer.json has no way to choose one variable: substitution is one non-greedy regex pass whose default is literal text, so any form still naming HOME keeps the join on Windows. A Compose file using ${USERPROFILE:-${HOME}} was the only form that could meet this issue's first Done When item, and it was declined for its cost against one launch path with a workaround.
So the first Done When item is dropped. The second holds only with conditions the docs now state, since the measured start used a synthetic home and a replaced image tag. A real Windows host can also lack the gh mount source, because Windows gh defaults to %AppData%\GitHub CLI. The third is moot, since no mount line changes. The shipped image tags fail on every host, which is filed as #3858.
Activity
ptr727 commentedon Nov 4, 2026
Maintainer answer (2026-11-03): document the limit and close this issue, rather than moving the snippets to Compose.
devcontainer.jsonhas no way to choose one variable: substitution is one non-greedy regex pass whose default is literal text, so any form still namingHOMEkeeps the join on Windows. A Compose file using${USERPROFILE:-${HOME}}was the only form that could meet this issue's first Done When item, and it was declined for its cost against one launch path with a workaround.So the first Done When item is dropped. The second holds only with conditions the docs now state, since the measured start used a synthetic home and a replaced image tag. A real Windows host can also lack the
ghmount source, because Windowsghdefaults to%AppData%\GitHub CLI. The third is moot, since no mount line changes. The shipped image tags fail on every host, which is filed as #3858.Document a Windows Devcontainer Launch With HOME and USERPROFILE Set (#…
Name the Snippets' Host Mount Paths and Give mktemp an Explicit Templ…