()
| 35 | # --------------------------------------------------------------------------- |
| 36 | |
| 37 | def find_git_root() -> Path: |
| 38 | result = subprocess.run( |
| 39 | ["git", "rev-parse", "--show-toplevel"], |
| 40 | capture_output=True, text=True, check=True, |
| 41 | ) |
| 42 | return Path(result.stdout.strip()) |
| 43 | |
| 44 | |
| 45 | def run(cmd, *, cwd, dry_run=False, check=True, capture=False): |