MCPcopy Create free account
hub / github.com/TrainLoop/evals / check_claude_code_available

Function check_claude_code_available

scripts/release.py:64–82  ·  view source on GitHub ↗

Check if Claude Code CLI is available and return the path.

()

Source from the content-addressed store, hash-verified

62
63
64def check_claude_code_available() -> Optional[str]:
65 """Check if Claude Code CLI is available and return the path."""
66 # Check common locations for Claude Code CLI
67 claude_paths = [
68 "claude", # If in PATH
69 os.path.expanduser("~/.claude/local/claude"), # User home
70 ]
71
72 for claude_path in claude_paths:
73 try:
74 result = subprocess.run(
75 [claude_path, "--version"], capture_output=True, text=True, check=False
76 )
77 if result.returncode == 0:
78 return claude_path
79 except (subprocess.CalledProcessError, FileNotFoundError):
80 continue
81
82 return None
83
84
85def get_previous_version() -> Optional[str]:

Callers 3

create_release_notesFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected