diff --git a/index.js b/index.js index 496d1c0..84fd88c 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -var fs = require('fs') +var fsAccess = require('fs-access') var path = require('path') var which = require('which') @@ -56,7 +56,7 @@ function getChromeExe (chromeDirName) { prefix = prefixes[i] try { windowsChromeDirectory = path.join(prefix, suffix) - fs.accessSync(windowsChromeDirectory) + fsAccess.sync(windowsChromeDirectory) return windowsChromeDirectory } catch (e) {} } @@ -88,7 +88,7 @@ function getChromeDarwin (defaultPath) { try { var homePath = path.join(process.env.HOME, defaultPath) - fs.accessSync(homePath) + fsAccess.sync(homePath) return homePath } catch (e) { return defaultPath diff --git a/package.json b/package.json index 03c9ffa..62b5a2e 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ ], "author": "Vojta Jina ", "dependencies": { + "fs-access": "^1.0.0", "which": "^1.0.9" }, "license": "MIT",