Compare commits
4 Commits
9af9b79237
...
1abb5927e3
| Author | SHA1 | Date | |
|---|---|---|---|
| 1abb5927e3 | |||
| 1551fa64a4 | |||
| 536045efc4 | |||
| 5895d3bbe7 |
4
envar.js
4
envar.js
@ -56,7 +56,7 @@ module.exports = {
|
||||
commander.parse(process.argv)
|
||||
delete global.envar.commanderOptions
|
||||
|
||||
console.log('- Merging Command Line Parameters into Configuration (把命令行参数值合并入配置)')
|
||||
// console.log('- Merging Command Line Parameters into Configuration (把命令行参数值合并入配置)')
|
||||
for (let key in commander) {
|
||||
if (!/^_/.test(key) && typeof commander[key] === 'string') {
|
||||
// commander 自带了一批 _开头的属性,过滤掉
|
||||
@ -73,7 +73,7 @@ module.exports = {
|
||||
|
||||
/* 读取动态配置文件中的环境变量。
|
||||
*/
|
||||
get_dynamic_envar ({ dynamicEnvarFiles = './envar-base-dynamic.js' } = {}) {
|
||||
get_dynamic_envar ({ dynamicEnvarFiles = ['./envar-base-dynamic.js'] } = {}) {
|
||||
// config file should be absolute or relative to the node process's dir.
|
||||
|
||||
let dynamicEnvar = {}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user