Skip to content

Commit 5841753

Browse files
STRRLclaude
andcommitted
fix: support Claude CLI installed via migrate-installer
After running `claude migrate-installer`, the Claude executable is moved from PATH to ~/.claude/local/claude. This change updates check_tool() to prioritize checking this local path before falling back to PATH lookup. Fixes: #123 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e786a9d commit 5841753

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/specify_cli/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,17 @@ def run_command(cmd: list[str], check_return: bool = True, capture: bool = False
332332

333333
def check_tool(tool: str, install_hint: str) -> bool:
334334
"""Check if a tool is installed."""
335+
336+
# Special handling for Claude CLI after `claude migrate-installer`
337+
# See: https://github.com/github/spec-kit/issues/123
338+
# The migrate-installer command REMOVES the original executable from PATH
339+
# and creates an alias at ~/.claude/local/claude instead
340+
# This path should be prioritized over other claude executables in PATH
341+
if tool == "claude":
342+
claude_local_path = Path.home() / ".claude" / "local" / "claude"
343+
if claude_local_path.exists() and claude_local_path.is_file():
344+
return True
345+
335346
if shutil.which(tool):
336347
return True
337348
else:

0 commit comments

Comments
 (0)