From 3abec636fa6b84f8813855cbfca5c03cbbd8f9b7 Mon Sep 17 00:00:00 2001 From: Shell Turner Date: Wed, 1 Oct 2014 23:25:25 +0200 Subject: [PATCH] Fix fs.exists to existsSync where necessary --- src/helper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helper.js b/src/helper.js index 9c5b11a9..4069d0db 100644 --- a/src/helper.js +++ b/src/helper.js @@ -4,9 +4,9 @@ var path = require("path"); var Helper = module.exports = { getConfig: function () { var filename = process.env.SHOUT_CONFIG; - if(!filename || !fs.exists(filename)) { + if(!filename || !fs.existsSync(filename)) { filename = this.resolveHomePath("config.js"); - if(!fs.exists(filename)) { + if(!fs.existsSync(filename)) { filename = path.resolve(__dirname, "..", "config"); } } @@ -15,7 +15,7 @@ var Helper = module.exports = { getHomeDirectory: function () { return ( - (process.env.SHOUT_CONFIG && fs.exists(process.env.SHOUT_CONFIG) && this.getConfig().home) + (process.env.SHOUT_CONFIG && fs.existsSync(process.env.SHOUT_CONFIG) && this.getConfig().home) || process.env.SHOUT_HOME || path.resolve(process.env.HOME, ".shout") );