Does not support multiple arguments
dzuelke opened this issue · comments
David Zülke commented
Given multiple arguments, which
is supposed to print the location of each match, and return the number of errors as the exit code.
For example:
$ which ls mkdir
/bin/ls
/bin/mkdir
$ echo $?
0
$ which doesnotexist mkdir
/bin/mkdir
$ echo $?
1
However, this package doesn't behave that way:
$ node_modules/.bin/which ls mkdir
/bin/ls
$ echo $?
0
$ node_modules/.bin/which doesnotexist mkdir
not found: doesnotexist
$ echo $?
127
David Zülke commented
(and then with .node_modules/bin/
on $PATH
, Bash stuff that uses which
just magically blows up)
isaacs commented
Patch welcome to make it behave identical to which(1)
!
David Zülke commented
Fine... see #20 !
isaacs commented
Landed on 1.2.0