From d994dc804858ad223cf7a303d131e3498994e6cf Mon Sep 17 00:00:00 2001 From: "Adam J. Mendoza" Date: Wed, 1 Nov 2017 04:41:47 -0700 Subject: [PATCH] Update configLocation.js First time running this on a Mac so the userConfigPath does not exists. The code was erroring out on ` if (!fs.statSync(userConfigPath).isDirectory()) {` The new code is tested as working on Mac. createUserConfig(userConfigPath) is probably no longer needed. --- app/public/js/common/configLocation.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/public/js/common/configLocation.js b/app/public/js/common/configLocation.js index 8dda7e44..af4ac468 100644 --- a/app/public/js/common/configLocation.js +++ b/app/public/js/common/configLocation.js @@ -40,9 +40,10 @@ const configuration = { // create user config in path // if there is no userConfig path - if (!fs.statSync(userConfigPath).isDirectory()) { - this.createUserConfig() - } + fs.ensureDir(userConfigPath, err => { + // console.log(err) // => null + // dir has now been created, including the directory it is to be placed in + }) return userConfigPath; },