(
args: list[str | Path], check: bool = True, **kwargs: Any
)
| 40 | |
| 41 | |
| 42 | def run( |
| 43 | args: list[str | Path], check: bool = True, **kwargs: Any |
| 44 | ) -> subprocess.CompletedProcess[Any]: |
| 45 | result = subprocess.run(args, check=False, text=True, **kwargs) |
| 46 | if check and result.returncode: |
| 47 | print(f"Command failed with exit status {result.returncode}") |
| 48 | print("Command was:", " ".join(str(x) for x in args)) |
| 49 | sys.exit(result.returncode) |
| 50 | return result |
| 51 | |
| 52 | |
| 53 | @functools.cache |
no test coverage detected