Skip to content

Commit 6d4d324

Browse files
committed
Fix Windows smoke 8a: basename comparison + debug output for path mismatch
1 parent 18298d2 commit 6d4d324

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

scripts/smoke-test.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,13 @@ HOME="$FAKE_HOME" PATH="$FAKE_HOME/.local/bin:$PATH" "$BINARY" install -y 2>&1 |
527527
json_get() { python3 -c "import json,sys,os; f='$1'; d=json.load(open(f)) if os.path.isfile(f) else {}; print($2)" 2>/dev/null || echo ""; }
528528

529529
# 8a: Claude Code MCP (new path) — correct command
530-
CMD=$(json_get "$FAKE_HOME/.claude.json" "d['mcpServers']['codebase-memory-mcp']['command']")
531-
if [ "$CMD" != "$SELF_PATH" ]; then
530+
CMD=$(json_get "$FAKE_HOME/.claude.json" "d.get('mcpServers',{}).get('codebase-memory-mcp',{}).get('command','')")
531+
# On Windows/MSYS2, paths differ (D:\... vs /tmp/...) — compare basename
532+
CMD_BASE=$(basename "$CMD" 2>/dev/null || echo "")
533+
SELF_BASE=$(basename "$SELF_PATH" 2>/dev/null || echo "")
534+
if [ -z "$CMD" ] || ([ "$CMD" != "$SELF_PATH" ] && [ "$CMD_BASE" != "$SELF_BASE" ]); then
535+
echo "DEBUG 8a: file=$FAKE_HOME/.claude.json"
536+
cat "$FAKE_HOME/.claude.json" 2>/dev/null | head -5 || echo "(file not found)"
532537
echo "FAIL 8a: .claude.json command='$CMD', expected '$SELF_PATH'"
533538
exit 1
534539
fi

0 commit comments

Comments
 (0)