Skip to content

Commit e56cc94

Browse files
z4nr34lclaude
andcommitted
fix(setup): check multiple paths for host-gitconfig mount
DinD mounts tmpfs over /tmp, hiding bind mounts placed there. Now checks $HOME/.host-gitconfig first, falling back to /tmp/.host-gitconfig. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5e4f500 commit e56cc94

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

setup.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ CURRENT_USER="$(id -un)"
77
CURRENT_GROUP="$(id -gn)"
88

99
# ── Git config ───────────────────────────────────────────────────────────────
10-
if [ -f /tmp/.host-gitconfig ]; then
10+
# Check multiple paths: DinD mounts tmpfs over /tmp, hiding bind mounts there
11+
HOST_GITCONFIG=""
12+
for p in "$HOME/.host-gitconfig" /tmp/.host-gitconfig; do
13+
[ -f "$p" ] && HOST_GITCONFIG="$p" && break
14+
done
15+
if [ -n "$HOST_GITCONFIG" ]; then
1116
echo "==> Copying host .gitconfig..."
12-
cp /tmp/.host-gitconfig "$HOME/.gitconfig"
17+
cp "$HOST_GITCONFIG" "$HOME/.gitconfig"
1318
chown "$CURRENT_USER:$CURRENT_GROUP" "$HOME/.gitconfig" 2>/dev/null || true
1419
fi
1520

0 commit comments

Comments
 (0)