From c76bff7036b80bdaff13f80ca2df41802dde5935 Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Wed, 18 Dec 2019 20:33:26 +1030 Subject: [PATCH] Fixed issue with env and config --- lib/common.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/common.js b/lib/common.js index 39d1351..978ff32 100755 --- a/lib/common.js +++ b/lib/common.js @@ -209,6 +209,13 @@ const getConfig = () => { config = Object.assign(config, localConfigFile); } + // Override from env.yaml environment file + Object.keys(config).forEach((configKey) => { + if(process.env[configKey]){ + config[configKey] = process.env[configKey]; + } + }); + config.customCss = typeof config.customCss !== 'undefined' ? escape.decode(config.customCss) : null; config.footerHtml = typeof config.footerHtml !== 'undefined' ? escape.decode(config.footerHtml) : null; config.googleAnalytics = typeof config.googleAnalytics !== 'undefined' ? escape.decode(config.googleAnalytics) : null; @@ -221,13 +228,6 @@ const getConfig = () => { config.themeViews = '../views/themes/' + config.theme + '/'; - // Override from env.yaml environment file - Object.keys(config).forEach((configKey) => { - if(process.env[configKey]){ - config[configKey] = process.env[configKey]; - } - }); - // set the environment for files config.env = '.min'; if(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === undefined){