Skip to content

Commit 5149573

Browse files
author
Karl Ranna
committed
fixup! feat(config): harden configuration checks
1 parent abc085d commit 5149573

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/config.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ const setLogLevel = (logLevel: string): Level => {
5454
};
5555

5656
const getEnvironmentConfig = (): DotenvParseOutput => {
57-
const environmentConfig = REQUIRED_CONFIGURATION_OPTIONS.reduce(
58-
(envConfig: DotenvParseOutput, configOption) => {
59-
if (process.env[configOption]) {
60-
return {
61-
...envConfig,
62-
[configOption]: process.env[configOption]!,
63-
};
64-
}
65-
return envConfig;
66-
},
67-
{}
68-
);
57+
const environmentConfig = REQUIRED_CONFIGURATION_OPTIONS.concat(
58+
REQUIRED_CONFIGURATION_OPTIONS_LIVE_CEX_ENABLED,
59+
REQUIRED_CONFIGURATION_OPTIONS_LIVE_CEX_DISABLED
60+
).reduce((envConfig: DotenvParseOutput, configOption) => {
61+
if (process.env[configOption]) {
62+
return {
63+
...envConfig,
64+
[configOption]: process.env[configOption]!,
65+
};
66+
}
67+
return envConfig;
68+
}, {});
6969
return environmentConfig;
7070
};
7171

0 commit comments

Comments
 (0)