From 25df77695eec70ce625c3c8eac3e3afd280f2725 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Tue, 12 Mar 2024 21:16:14 -0700 Subject: [PATCH] configname ref --- index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 4815428..914621f 100644 --- a/index.js +++ b/index.js @@ -146,11 +146,14 @@ Liftoff.prototype.buildEnvironment = function (opts) { return loadConfig(cwd, startingLocation, defaultConfig); }); + var configName = this.configName; + var configPathOverride = arrayFind(Object.keys(config), function (key) { var cfg = config[key]; console.log(cfg); - if (Object.prototype.hasOwnProperty.call(cfg, this.configName)) { - console.log(cfg[this.configName]); + console.log(configName); + if (Object.prototype.hasOwnProperty.call(cfg, configName)) { + console.log(cfg[configName]); return cfg[this.configName]; } }); @@ -165,7 +168,7 @@ Liftoff.prototype.buildEnvironment = function (opts) { // calculate the regex to use for finding the config file var configNameSearch = buildConfigName({ - configName: this.configName, + configName: configName, extensions: Object.keys(this.extensions), });