Skip to content

pminit outputs extra garbage when npm exits with non-zero status #254

@wesgarland

Description

@wesgarland

Issue type

Bug

How did you install PythonMonkey?

Source

OS platform and distribution

No response

Python version (python --version)

No response

PythonMonkey version (pip show pythonmonkey)

0.3.1.dev39+67e65d0

Bug Description

[~/git/pythonmonkey] dev-wes:wes# pminit npm audit
# npm audit report

browserify-sign  2.6.0 - 4.2.1
Severity: high
browserify-sign upper bound check issue in `dsaVerify` leads to a signature forgery attack - https://github.com/advisories/GHSA-x9w5-v3q2-3rhw
fix available via `npm audit fix`
node_modules/browserify-sign

1 high severity vulnerability

To address all issues, run:
  npm audit fix
Traceback (most recent call last):
  File "/home/wes/.cache/pypoetry/virtualenvs/pythonmonkey-MW5q-TkO-py3.10/bin/pminit", line 8, in <module>
    sys.exit(main())
  File "/home/wes/git/pythonmonkey/python/pminit/pminit/cli.py", line 36, in main
    execute(' '.join( args.executable + args.args ), pythonmonkey_path)
  File "/home/wes/git/pythonmonkey/python/pminit/pminit/cli.py", line 15, in execute
    raise subprocess.CalledProcessError(return_code, cmd)
subprocess.CalledProcessError: Command 'npm audit' returned non-zero exit status 1.
[~/git/pythonmonkey] dev-wes:wes# 

This should just exit with the relevant exit code without all the extra Traceback hoopla on the screen.

Standalone code to reproduce the issue

No response

Relevant log output or backtrace

No response

Additional info if applicable

No response

What branch of PythonMonkey were you developing on? (If applicable)

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions