mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 08:22:33 +02:00
12 lines
227 B
Python
12 lines
227 B
Python
|
|
||
|
|
||
|
from pathlib import Path
|
||
|
import os
|
||
|
import subprocess
|
||
|
|
||
|
def run(cmd, cwd=Path.cwd()):
|
||
|
result = subprocess.run(cmd, shell=True, cwd=cwd)
|
||
|
if result.returncode != 0:
|
||
|
raise RuntimeError(f"Failed to execute {cmd}")
|
||
|
|