Skip to content

Commit

Permalink
Fix JSON/YAML overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-lau committed May 11, 2024
1 parent b19b432 commit a62e13c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,6 @@ function merge_struct(defaults, overrides) {
}
return defaults
}

// Load smtp.json or smtp.yaml as early as possible
module.exports.get('smtp.json');
4 changes: 3 additions & 1 deletion lib/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ class Reader {
const fn = key.substr(1)
// Overwrite the config cache for this filename
console.log(`Overriding file ${fn} with config from ${name}`)
this._config_cache[path.join(cp, fn)] = result[key]
const cache_key = path.join(cp, fn)
this._overrides[cache_key] = true
this._config_cache[cache_key] = result[key]
}
}
}
Expand Down

0 comments on commit a62e13c

Please sign in to comment.