Closed d0tkom closed 5 years ago
Interesting... I checked the docs on the exec method and your reasoning makes sense, but for some reason it has been working for me all of this time. Could you propose a PR and we can have a look?
npm audit
returns success when there are no vulnerabilities as an exit code 0 which would make err
be null
. So (at least for me) npm-audit-ci-wrapper
throws "An unexpected error has occurred" when there are no vulnerabilities. It seems logical npm-audit-ci-wrapper
should exit with 0 in this case (which makes it useful in a CI pipeline).
@TazSp Makes sense. I'd be happy to review a PR.
This was resolved by #11
For some of my projects running
npm-audit-ci-wrapper
fails with 'An unexpected error has occurred'. I looked into the code, and was wondering what's the reason for throwing this error here iferr
is null?as far as I know if everything goes correctly,
err
should be null no?