MCPcopy Create free account
hub / github.com/BerriAI/litellm / _run

Function _run

scripts/openapi_docs_gate.py:57–62  ·  view source on GitHub ↗
(cmd: Sequence[str], cwd: Path = REPO_ROOT, env: Mapping[str, str] | None = None)

Source from the content-addressed store, hash-verified

55
56
57def _run(cmd: Sequence[str], cwd: Path = REPO_ROOT, env: Mapping[str, str] | None = None) -> str:
58 proc: Final = subprocess.run(cmd, cwd=cwd, capture_output=True, text=True, env=env)
59 if proc.returncode != 0:
60 sys.stderr.write(proc.stderr)
61 raise SystemExit(f"{cmd[0]} exited {proc.returncode}")
62 return proc.stdout
63
64
65def checker_identity(checker: Path = CHECKER) -> Checker:

Callers 4

_checkFunction · 0.70
_install_base_nativeFunction · 0.70
base_countsFunction · 0.70
cmd_checkFunction · 0.70

Calls 2

runMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected