Merge pull request #124 from STRRL/fix/compatibility-claude-migrate-installer
fix: support Claude CLI installed via migrate-installer
This commit is contained in:
@@ -59,6 +59,9 @@ AI_CHOICES = {
|
|||||||
"gemini": "Gemini CLI"
|
"gemini": "Gemini CLI"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Claude CLI local installation path after migrate-installer
|
||||||
|
CLAUDE_LOCAL_PATH = Path.home() / ".claude" / "local" / "claude"
|
||||||
|
|
||||||
# ASCII Art Banner
|
# ASCII Art Banner
|
||||||
BANNER = """
|
BANNER = """
|
||||||
███████╗██████╗ ███████╗ ██████╗██╗███████╗██╗ ██╗
|
███████╗██████╗ ███████╗ ██████╗██╗███████╗██╗ ██╗
|
||||||
@@ -337,6 +340,16 @@ def run_command(cmd: list[str], check_return: bool = True, capture: bool = False
|
|||||||
|
|
||||||
def check_tool(tool: str, install_hint: str) -> bool:
|
def check_tool(tool: str, install_hint: str) -> bool:
|
||||||
"""Check if a tool is installed."""
|
"""Check if a tool is installed."""
|
||||||
|
|
||||||
|
# Special handling for Claude CLI after `claude migrate-installer`
|
||||||
|
# See: https://github.com/github/spec-kit/issues/123
|
||||||
|
# The migrate-installer command REMOVES the original executable from PATH
|
||||||
|
# and creates an alias at ~/.claude/local/claude instead
|
||||||
|
# This path should be prioritized over other claude executables in PATH
|
||||||
|
if tool == "claude":
|
||||||
|
if CLAUDE_LOCAL_PATH.exists() and CLAUDE_LOCAL_PATH.is_file():
|
||||||
|
return True
|
||||||
|
|
||||||
if shutil.which(tool):
|
if shutil.which(tool):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user