Skip to content

Commit 6e1b3b2

Browse files
committed
Fix smoke test: set XDG_CONFIG_HOME for portable Linux agent detection
On Alpine musl (portable builds), cbm_app_config_dir() needs explicit XDG_CONFIG_HOME to resolve to FAKE_HOME/.config. Without it, the install writes to the wrong path and KiloCode/Zed config checks fail.
1 parent 36aaa5d commit 6e1b3b2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/smoke-test.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,9 @@ echo '{"existingKey": true}' > "$FAKE_HOME/.claude.json"
520520
echo '{"existingKey": true}' > "$FAKE_HOME/.gemini/settings.json"
521521
printf '[existing_section]\nline_from_user = true\n' > "$FAKE_HOME/.codex/config.toml"
522522

523-
# Run install
524-
HOME="$FAKE_HOME" PATH="$FAKE_HOME/.local/bin:$PATH" "$BINARY" install -y 2>&1 || true
523+
# Run install — set XDG_CONFIG_HOME explicitly so cbm_app_config_dir() resolves
524+
# to FAKE_HOME/.config even on minimal systems (Alpine musl, no NSS).
525+
HOME="$FAKE_HOME" XDG_CONFIG_HOME="$FAKE_HOME/.config" PATH="$FAKE_HOME/.local/bin:$PATH" "$BINARY" install -y 2>&1 || true
525526

526527
# Helper for JSON validation (pipe file to python — avoids MSYS2 path translation issues)
527528
json_get() { cat "$1" 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print($2)" 2>/dev/null || echo ""; }
@@ -740,7 +741,7 @@ echo ""
740741
echo "=== Phase 9: agent config uninstall E2E ==="
741742

742743
# Run uninstall (same FAKE_HOME with all configs present)
743-
HOME="$FAKE_HOME" PATH="$FAKE_HOME/.local/bin:$PATH" "$BINARY" uninstall -y -n 2>&1 || true
744+
HOME="$FAKE_HOME" XDG_CONFIG_HOME="$FAKE_HOME/.config" PATH="$FAKE_HOME/.local/bin:$PATH" "$BINARY" uninstall -y -n 2>&1 || true
744745

745746
# 9a-b: Claude Code MCP removed but existing keys preserved
746747
if cat "$FAKE_HOME/.claude.json" 2>/dev/null | python3 -c "

0 commit comments

Comments
 (0)