diff options
author | Rebecca Turner <me@re-becca.org> | 2017-04-12 21:47:49 -0700 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2017-04-25 10:52:01 -0400 |
commit | 00842604483e4c2e622dfdb3a97440e07646158f (patch) | |
tree | f3346902636a44b6037652523767636bf7e4f2c9 /deps/npm/node_modules/which/node_modules/isexe/mode.js | |
parent | 061c5da010e0d249379618382a499840d38247b8 (diff) | |
download | android-node-v8-00842604483e4c2e622dfdb3a97440e07646158f.tar.gz android-node-v8-00842604483e4c2e622dfdb3a97440e07646158f.tar.bz2 android-node-v8-00842604483e4c2e622dfdb3a97440e07646158f.zip |
deps: upgrade npm to 4.5.0
PR-URL: https://github.com/nodejs/node/pull/12480
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/node_modules/which/node_modules/isexe/mode.js')
-rw-r--r-- | deps/npm/node_modules/which/node_modules/isexe/mode.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/deps/npm/node_modules/which/node_modules/isexe/mode.js b/deps/npm/node_modules/which/node_modules/isexe/mode.js index 2044280728..1995ea4a06 100644 --- a/deps/npm/node_modules/which/node_modules/isexe/mode.js +++ b/deps/npm/node_modules/which/node_modules/isexe/mode.js @@ -4,13 +4,17 @@ isexe.sync = sync var fs = require('fs') function isexe (path, options, cb) { - fs.stat(path, function (er, st) { - cb(er, er ? false : checkMode(st, options)) + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) }) } function sync (path, options) { - return checkMode(fs.statSync(path), options) + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) } function checkMode (stat, options) { |