Skip to content

Commit daab646

Browse files
dguidoclaude
andauthored
Fix bind mount failure when ~/.gitconfig does not exist (#24)
Docker bind mounts require the source file to exist. Users without ~/.gitconfig (fresh machines, XDG-based config, system-only config) hit a container start failure. Add initializeCommand to create an empty ~/.gitconfig on the host before the container starts. An empty gitconfig is valid and has no side effects — git treats it as having no settings. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 84a3aa4 commit daab646

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"PYTHONDONTWRITEBYTECODE": "1",
6464
"PIP_DISABLE_PIP_VERSION_CHECK": "1"
6565
},
66+
"initializeCommand": "test -f \"$HOME/.gitconfig\" || touch \"$HOME/.gitconfig\"",
6667
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=delegated",
6768
"workspaceFolder": "/workspace",
6869
"postCreateCommand": "uv run --no-project /opt/post_install.py"

0 commit comments

Comments
 (0)