Writes content to a file, creating parent directories if they don't exist.
(path: str, content: str)
| 26 | path: Path, command: list[str], proc: subprocess.CompletedProcess[str] |
| 27 | ) -> None: |
| 28 | if command: |
| 29 | rendered_command = " ".join(command) |
| 30 | elif isinstance(proc.args, str): |
| 31 | rendered_command = proc.args |
| 32 | else: |
| 33 | rendered_command = " ".join(str(argument) for argument in proc.args) |
| 34 | path.write_text( |
| 35 | f"--- COMMAND ---\n{rendered_command}\n\n" |