ci(core): Load config schema after process.env has been overwritten (no-changelog) (#7550)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-11-07 15:58:28 +01:00
committed by GitHub
parent 60314248f4
commit f0fc5b16d3
7 changed files with 25 additions and 18 deletions

View File

@@ -2,7 +2,6 @@ import convict from 'convict';
import dotenv from 'dotenv';
import { readFileSync } from 'fs';
import { setGlobalState } from 'n8n-workflow';
import { schema } from './schema';
import { inTest, inE2ETests } from '@/constants';
if (inE2ETests) {
@@ -25,6 +24,8 @@ if (inE2ETests) {
dotenv.config();
}
// Load schema after process.env has been overwritten
import { schema } from './schema';
const config = convict(schema, { args: [] });
// eslint-disable-next-line @typescript-eslint/unbound-method