Bin-wrapper recompiles, no matter if binary is avalible in PATH?
offlinehacker opened this issue · comments
This statement is in all views wrong:
if (isbin(this.bin)) {
if (!which.sync(self.bin).indexOf('node_modules/.bin')) {
return which.sync(self.bin);
}
}
The return part never gets called(actually it does if node_packages/.bin starts at char 0, but i guess that's not a desired behaviour).
Even if i fix this and bin-wrapper finds path, my CPU goes to 100%, and i don't know what's wrong from there on.
node 0.10.12
npm 1.2.32
bin-wrapper 0.1.6
Seems like the problem is that the .bin
folder doesn't get excluded on Linux.
!which.sync(self.bin).indexOf('node_modules/.bin') ruturns true only if node_modules/.bin is at index 0,. Please note !0 = true, if string is not found indexOf returns -1 and !-1 = false, i don't think that's desired behaviour?
So which.sync(self.bin).indexOf('node_modules/.bin') === -1
should work?