salt
salt copied to clipboard
npm list no longer works since npm v1.3.14
npm list will now return exit code 1 for no packages found
https://github.com/isaacs/npm/commit/f33163c5723809f64ffbbe56c05502d9ab449ad5
Experiencing this too.
Salt's output:
[INFO ] Executing command 'npm list --json --global "[email protected]"' in directory '...'
[ERROR ] Command 'npm list --json --global "[email protected]"' failed with return code: 1
[ERROR ] stdout: {}
Playing around:
$ npm list --json --global "[email protected]"; echo $?
{}
1
$ npm list --json --global; echo $?
...
0
$
So, like you say, it seems an exit code 1 from npm is interpreted as a failure by Salt, when it's just saying that the package wasn't found.
Nice!