which
Advanced tools
Comparing version 1.2.14 to 1.3.0
# Changes | ||
## v1.3.0 | ||
* Add nothrow option to which.sync | ||
* update tap | ||
## v1.2.14 | ||
@@ -5,0 +10,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", | ||
"version": "1.2.14", | ||
"version": "1.3.0", | ||
"repository": { | ||
@@ -20,3 +20,3 @@ "type": "git", | ||
"rimraf": "^2.3.3", | ||
"tap": "^10.3.0" | ||
"tap": "^10.7.0" | ||
}, | ||
@@ -23,0 +23,0 @@ "scripts": { |
@@ -24,2 +24,5 @@ # which | ||
// if nothrow option is used, returns null if not found | ||
resolved = which.sync('node', {nothrow: true}) | ||
// Pass options to override the PATH and PATHEXT environment vars. | ||
@@ -26,0 +29,0 @@ which('node', { path: someOtherPath }, function (er, resolved) { |
@@ -131,3 +131,6 @@ module.exports = which | ||
if (opt.nothrow) | ||
return null | ||
throw getNotFoundError(cmd) | ||
} |
9378
112
52