Run a git command and return output, or 'unknown' on failure.
(args: list[str])
| 237 | |
| 238 | |
| 239 | def _run_git_command(args: list[str]) -> str: |
| 240 | """Run a git command and return output, or 'unknown' on failure.""" |
| 241 | try: |
| 242 | return subprocess.check_output(args, cwd=get_git_root(), text=True).strip() |
| 243 | except (subprocess.CalledProcessError, RuntimeError): |
| 244 | return "unknown" |
| 245 | |
| 246 | |
| 247 | def _get_git_info() -> tuple[str, str]: |
no test coverage detected
searching dependent graphs…