npm / node-which

Like which(1) unix command. Find the first instance of an executable in the PATH.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not return if the command is not executable by user's primary group

whs opened this issue · comments

Steps to reproduce:

  1. sudo chmod o-x /usr/bin/make
  2. sudo chown root:sudo /usr/bin/make
  3. Run a node-gyp build from a user who is a member of group sudo, but sudo is not his primary group

(Tested on Debian 6.0.8)

node-gyp will complain about missing make, even if make is in fact executable by current user.

Related SO

Yes, we need to check against all the results from process.getgroups() if the function is available. Patch welcome.