extracted function to utils

This commit is contained in:
Karma Riuk
2025-03-28 15:03:45 +01:00
parent 649043d9f0
commit 838837a788
2 changed files with 11 additions and 11 deletions

View File

@ -147,3 +147,11 @@ def clone(repo: str, dest: str, updates: dict = {}, force: bool = False, verbose
else:
updates["cloned_successfully"] = True
return True
def run_git_cmd(cmd: list[str], repo_path: str) -> subprocess.CompletedProcess:
return subprocess.run(
["git", "-C", repo_path] + cmd,
check=True,
capture_output=True,
text=True,
)