Skip to content

Commit dbefa64

Browse files
author
Hamada Gasmallah
committed
fix(pminit/cli.py): npm --help returns non-zero exit code but shouldn't raise an error as it's a valid command
1 parent da5acbe commit dbefa64

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/pminit/pminit/cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ def execute(cmd: str, cwd: str):
1111

1212
popen.stdout.close()
1313
return_code = popen.wait()
14-
if return_code:
14+
#For some reason npm returns a non zero
15+
#exit code when `--help` is used in the commands.
16+
#This shouldn't raise an error.
17+
if return_code and "--help" not in cmd:
1518
raise subprocess.CalledProcessError(return_code, cmd)
1619

1720
def commandType(value: str):

0 commit comments

Comments
 (0)