Skip to content

Commit c0af5ff

Browse files
Merge pull request #363 from Distributive-Network/Xmader/fix/pminit-error-output
`pminit` should exit directly once the `npm` command it runs ends with a non-zero exit code
2 parents 4e40ee0 + f82af09 commit c0af5ff

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

python/pminit/pminit/cli.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def execute(cmd: str, cwd: str):
1111

1212
popen.stdout.close()
1313
return_code = popen.wait()
14-
if return_code:
15-
raise subprocess.CalledProcessError(return_code, cmd)
14+
if return_code != 0:
15+
sys.exit(return_code)
1616

1717
def commandType(value: str):
1818
if value != "npm":
@@ -34,7 +34,3 @@ def main():
3434
)
3535

3636
execute(' '.join( args.executable + args.args ), pythonmonkey_path)
37-
38-
39-
40-

0 commit comments

Comments
 (0)