salt icon indicating copy to clipboard operation
salt copied to clipboard

npm list no longer works since npm v1.3.14

Open graingert opened this issue 13 years ago • 2 comments

npm list will now return exit code 1 for no packages found

https://github.com/isaacs/npm/commit/f33163c5723809f64ffbbe56c05502d9ab449ad5

graingert avatar Nov 14 '13 11:11 graingert

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.

emilisto avatar Nov 14 '13 11:11 emilisto

Nice!

emilisto avatar Nov 14 '13 12:11 emilisto