MCPcopy Index your code
hub / github.com/TrainLoop/evals / run_cmd

Function run_cmd

scripts/release.py:48–61  ·  view source on GitHub ↗

Run a shell command.

(
    cmd: str, capture_output: bool = False, check: bool = True
)

Source from the content-addressed store, hash-verified

46
47
48def run_cmd(
49 cmd: str, capture_output: bool = False, check: bool = True
50) -> Optional[str]:
51 """Run a shell command."""
52 if not capture_output:
53 print(f"🔧 {cmd}")
54 if capture_output:
55 result = subprocess.run(
56 cmd, shell=True, capture_output=True, text=True, check=check
57 )
58 return result.stdout.strip()
59 else:
60 subprocess.run(cmd, shell=True, check=check)
61 return None
62
63
64def check_claude_code_available() -> Optional[str]:

Callers 8

get_previous_versionFunction · 0.85
check_git_statusFunction · 0.85
ensure_main_branchFunction · 0.85
create_release_notesFunction · 0.85
create_release_branchFunction · 0.85
run_version_bumpFunction · 0.85
create_pull_requestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected