From 299369b363b4ba8698876a2d5c47aaabb00cc7c2 Mon Sep 17 00:00:00 2001 From: Badri Sunderarajan Date: Mon, 4 May 2020 13:57:09 +0530 Subject: [PATCH] Bugfix: crashes when no config file detected It was looking for a (nonexistent, obsolete) variable to check if the "config" command is running. Now, it just looks at the command-line options directly and does it. --- config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config.js b/config.js index 5f47dbd..b7de251 100644 --- a/config.js +++ b/config.js @@ -80,7 +80,7 @@ let config = convict({ userConfig = path.join(os.homedir(), '.config/seance.yaml') if (fs.existsSync(userConfig)) { config.loadFile(userConfig) -} else if (!runSetup) { +} else if (process.argv[2] != 'setup') { console.warn( 'Warning: no config file detected! ' + 'Please run `seance setup` to configure your system' @@ -102,4 +102,3 @@ allConf = config.getProperties() allConf.validated = validated module.exports = allConf -