Run a git command, returning stdout or None if it fails.
(*args: str)
| 46 | |
| 47 | |
| 48 | def git_ok(*args: str) -> str | None: |
| 49 | """Run a git command, returning stdout or None if it fails.""" |
| 50 | try: |
| 51 | return git(*args) |
| 52 | except subprocess.CalledProcessError: |
| 53 | return None |
| 54 | |
| 55 | |
| 56 | def resolve_base(explicit: str | None) -> str | None: |
no test coverage detected