mirror of
https://github.com/crystelf/crystelf-core.git
synced 2025-07-04 06:39:18 +00:00
优化
This commit is contained in:
parent
daf5d53d46
commit
300f10e8d1
@ -29,7 +29,7 @@ class ConfigManger {
|
||||
const value = this.env[key];
|
||||
if (value === undefined) {
|
||||
if (defaultValue !== undefined) return defaultValue;
|
||||
logger.warn(`环境变量${key}未定义!`);
|
||||
logger.fatal(1, `环境变量${key}未定义!`);
|
||||
return undefined as T;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user