3 if (process.platform === 'win32' || global.TESTING_WINDOWS) {
4 core = require('./windows.js')
6 core = require('./mode.js')
12 function isexe (path, options, cb) {
13 if (typeof options === 'function') {
19 if (typeof Promise !== 'function') {
20 throw new TypeError('callback not provided')
23 return new Promise(function (resolve, reject) {
24 isexe(path, options || {}, function (er, is) {
34 core(path, options || {}, function (er, is) {
35 // ignore EACCES because that just means we aren't allowed to run it
37 if (er.code === 'EACCES' || options && options.ignoreErrors) {
46 function sync (path, options) {
47 // my kingdom for a filtered catch
49 return core.sync(path, options || {})
51 if (options && options.ignoreErrors || er.code === 'EACCES') {