diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/which | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/which')
-rw-r--r-- | node_modules/which/CHANGELOG.md | 5 | ||||
-rw-r--r-- | node_modules/which/README.md | 3 | ||||
-rw-r--r-- | node_modules/which/package.json | 4 | ||||
-rw-r--r-- | node_modules/which/which.js | 3 |
4 files changed, 13 insertions, 2 deletions
diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md index c44cfbec5..367acb12a 100644 --- a/node_modules/which/CHANGELOG.md +++ b/node_modules/which/CHANGELOG.md @@ -1,6 +1,11 @@ # Changes +## v1.3.0 + +* Add nothrow option to which.sync +* update tap + ## v1.2.14 * appveyor: drop node 5 and 0.x diff --git a/node_modules/which/README.md b/node_modules/which/README.md index 7f679d595..8c0b0cbf7 100644 --- a/node_modules/which/README.md +++ b/node_modules/which/README.md @@ -21,6 +21,9 @@ which('node', function (er, resolvedPath) { // throws if not found var resolved = which.sync('node') +// 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. which('node', { path: someOtherPath }, function (er, resolved) { if (er) diff --git a/node_modules/which/package.json b/node_modules/which/package.json index a67870ed1..34885223f 100644 --- a/node_modules/which/package.json +++ b/node_modules/which/package.json @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)", "name": "which", "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": { "type": "git", "url": "git://github.com/isaacs/node-which.git" @@ -16,7 +16,7 @@ "devDependencies": { "mkdirp": "^0.5.0", "rimraf": "^2.3.3", - "tap": "^10.3.0" + "tap": "^10.7.0" }, "scripts": { "test": "tap test/*.js --cov", diff --git a/node_modules/which/which.js b/node_modules/which/which.js index 70d974c18..4347f91a1 100644 --- a/node_modules/which/which.js +++ b/node_modules/which/which.js @@ -128,5 +128,8 @@ function whichSync (cmd, opt) { if (opt.all && found.length) return found + if (opt.nothrow) + return null + throw getNotFoundError(cmd) } |