Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit af4b3ac

Browse files
authored
Merge pull request #1227 from benelan/main
fix(logs): prevent shfmt environment variable deprecation warning
2 parents ada88bb + c4cccaf commit af4b3ac

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎server/src/config.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,12 @@ export function getConfigFromEnvironmentVariables(): {
102102
}
103103

104104
const environmentVariablesUsed = Object.entries(rawConfig)
105-
.map(([key, value]) => (typeof value !== 'undefined' ? key : null))
106-
.filter((key): key is string => key !== null)
107-
.filter((key) => key !== 'logLevel') // logLevel is a special case that we ignore
105+
.filter(
106+
([key, value]) =>
107+
!['undefined', 'object'].includes(typeof value) &&
108+
![null, 'logLevel'].includes(key),
109+
)
110+
.map(([key]) => key)
108111

109112
const config = ConfigSchema.parse(rawConfig)
110113

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /