parent
1a35ac4d73
commit
88d2f12b1f
|
|
@ -246,7 +246,7 @@ def get_libs():
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def run_git_command(cmd_args: list, cwd: str = None):
|
def run_git_command(cmd_args: list, cwd: str | None = None):
|
||||||
try:
|
try:
|
||||||
res = subprocess.run(cmd_args, capture_output=True, cwd = cwd, check=True)
|
res = subprocess.run(cmd_args, capture_output=True, cwd = cwd, check=True)
|
||||||
return res.stdout.decode(encoding = 'utf8', errors='ignore').strip() if len(res.stdout) > 0 else ''
|
return res.stdout.decode(encoding = 'utf8', errors='ignore').strip() if len(res.stdout) > 0 else ''
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue