From daab646db62755008eec79319768138a0d4d8bfa Mon Sep 17 00:00:00 2001 From: Dan Guido Date: Fri, 13 Feb 2026 11:52:07 -0500 Subject: [PATCH] Fix bind mount failure when ~/.gitconfig does not exist (#24) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- devcontainer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/devcontainer.json b/devcontainer.json index 4c8886d..d3cb0b2 100644 --- a/devcontainer.json +++ b/devcontainer.json @@ -63,6 +63,7 @@ "PYTHONDONTWRITEBYTECODE": "1", "PIP_DISABLE_PIP_VERSION_CHECK": "1" }, + "initializeCommand": "test -f \"$HOME/.gitconfig\" || touch \"$HOME/.gitconfig\"", "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=delegated", "workspaceFolder": "/workspace", "postCreateCommand": "uv run --no-project /opt/post_install.py"