Run a git command, returning stdout (stripped). Raises on failure.
(*args: str)
| 36 | |
| 37 | |
| 38 | def git(*args: str) -> str: |
| 39 | """Run a git command, returning stdout (stripped). Raises on failure.""" |
| 40 | return subprocess.run( |
| 41 | ["git", "-C", str(ROOT), *args], |
| 42 | capture_output=True, |
| 43 | text=True, |
| 44 | check=True, |
| 45 | ).stdout.strip() |
| 46 | |
| 47 | |
| 48 | def git_ok(*args: str) -> str | None: |