2
0

💚 Fix docker build when Sentry not enabled

This commit is contained in:
Baptiste Arnaud
2023-10-10 15:04:17 +02:00
parent 49826d1303
commit 54788a828e
4 changed files with 56 additions and 51 deletions

4
packages/env/env.ts vendored
View File

@@ -324,7 +324,9 @@ export const env = createEnv({
...sentryEnv.runtimeEnv,
...posthogEnv.runtimeEnv,
},
skipValidation: typeof window !== 'undefined' && window.__ENV === undefined,
skipValidation:
process.env.SKIP_ENV_CHECK === 'true' ||
(typeof window !== 'undefined' && window.__ENV === undefined),
onValidationError(error) {
console.error(
'❌ Invalid environment variables:',