(*args: str, **kwargs: Any)
| 12 | |
| 13 | |
| 14 | def git(*args: str, **kwargs: Any) -> str: |
| 15 | try: |
| 16 | process = subprocess.run( |
| 17 | ["git", *args], check=True, capture_output=True, text=True |
| 18 | ) |
| 19 | return process.stdout |
| 20 | except subprocess.CalledProcessError as error: |
| 21 | print(error.stdout, end="") |
| 22 | print(error.stderr, end="", file=sys.stderr) |
| 23 | raise |
| 24 | |
| 25 | |
| 26 | def replace_text(path: Path, old: str, new: str): |