diff --git a/.claude/scripts/migrate-identity.sh b/.claude/scripts/migrate-identity.sh index 872d5ed..f14ebc6 100755 --- a/.claude/scripts/migrate-identity.sh +++ b/.claude/scripts/migrate-identity.sh @@ -74,10 +74,13 @@ fi echo "" echo "[INFO] Updating identity.json..." -# Read existing, add new fields, write back -python3 -c " +# Read existing, add new fields, write back. +# On Windows, native Python can't open Git Bash POSIX paths (/d/...); convert to a +# drive-letter/forward-slash path for the interpreter. No-op (falls back) elsewhere. +IDENTITY_PATH_PY=$(cygpath -m "$IDENTITY_PATH" 2>/dev/null || echo "$IDENTITY_PATH") +"$PYTHON_CMD" -c " import json, sys -with open('$IDENTITY_PATH', 'r') as f: +with open('$IDENTITY_PATH_PY', 'r') as f: data = json.load(f) # Add new fields if not present @@ -98,7 +101,7 @@ if 'architecture' not in data: data['last_updated'] = '$(date -u +"%Y-%m-%dT%H:%M:%SZ")' -with open('$IDENTITY_PATH', 'w') as f: +with open('$IDENTITY_PATH_PY', 'w') as f: json.dump(data, f, indent=2) f.write('\n')