mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-04 21:28:12 +02:00
extracted function to utils
This commit is contained in:
8
utils.py
8
utils.py
@ -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,
|
||||
)
|
||||
|
Reference in New Issue
Block a user