which
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -5,3 +5,3 @@ { | ||
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -42,3 +42,6 @@ module.exports = which | ||
fs.stat(p + ext, function (er, stat) { | ||
if (!er && stat && isExe(stat.mode, stat.uid, stat.gid)) { | ||
if (!er && | ||
stat && | ||
stat.isFile() && | ||
isExe(stat.mode, stat.uid, stat.gid)) { | ||
//console.error("yes, exe!", p + ext) | ||
@@ -45,0 +48,0 @@ return cb(null, p + ext) |
2836
61