Skip to content

Commit 6f7bb70

Browse files
committed
feat(utils/run_cmd): don't check return code in helper function
1 parent 4468f2e commit 6f7bb70

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/debmagic/_utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ def run_cmd(
6666
if dry_run:
6767
return subprocess.CompletedProcess(cmd_args, 0)
6868

69-
ret = subprocess.run(cmd_args, check=False, **kwargs)
70-
71-
if check and ret.returncode != 0:
72-
raise RuntimeError(f"failed to execute {cmd_pretty}")
69+
ret = subprocess.run(cmd_args, check=check, **kwargs)
7370

7471
return ret
7572

0 commit comments

Comments
 (0)