Skip to content

Commit 44f7f23

Browse files
committed
fix: pass version arg to bypass installer fresh install bug
The Anthropic Windows installer skips copying the binary when the running version matches the target version, even on fresh installations where the target file doesn't exist. Pass "latest" as version argument when no specific version is requested to work around this issue. See: anthropics/claude-code#14942
1 parent 295ed1b commit 44f7f23

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/install_claude.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,9 +1311,13 @@ def install_claude_native_windows(version: str | None = None) -> bool:
13111311
temp_path,
13121312
]
13131313

1314-
# Add version parameter if specified
1315-
if version:
1316-
cmd.append(version) # PowerShell uses positional parameter
1314+
# CRITICAL: Always pass version argument to bypass Anthropic installer bug
1315+
# See: https://github.com/anthropics/claude-code/issues/14942
1316+
# Bug: installer skips copying when running version == target version,
1317+
# even if target file doesn't exist (fresh installations)
1318+
# Fix: pass "latest" when no specific version requested
1319+
version_arg = version or 'latest'
1320+
cmd.append(version_arg)
13171321

13181322
version_msg = f' version {version}' if version else ''
13191323
info(f'Installing Claude Code{version_msg} via native installer...')

0 commit comments

Comments
 (0)