Fix bind mount source for Windows hosts where HOME is unset #2

Merged
TimCane merged 1 commit from fix-windows-home-mount into main 2026-04-08 09:23:46 +01:00
TimCane commented 2026-04-08 09:22:18 +01:00 (Migrated from github.com)

On Windows, ${localEnv:HOME} expands to an empty string in devcontainer-feature.json (Windows uses USERPROFILE, not HOME), causing the bind mount source to resolve to a literal "/.claude/.credentials.json" and fail with "bind source path does not exist". Concatenate both vars so exactly one wins on each platform: ${localEnv:HOME}${localEnv:USERPROFILE}.

Add a lint script that asserts every mount source mentioning HOME also mentions USERPROFILE, and wire it into the test workflow so the regression can't sneak back in.

On Windows, ${localEnv:HOME} expands to an empty string in devcontainer-feature.json (Windows uses USERPROFILE, not HOME), causing the bind mount source to resolve to a literal "/.claude/.credentials.json" and fail with "bind source path does not exist". Concatenate both vars so exactly one wins on each platform: ${localEnv:HOME}${localEnv:USERPROFILE}. Add a lint script that asserts every mount source mentioning HOME also mentions USERPROFILE, and wire it into the test workflow so the regression can't sneak back in.
Sign in to join this conversation.
No description provided.