refactor(core): Load dotenv as early as possible (no-changelog) (#10948)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-09-25 12:37:51 +02:00
committed by GitHub
parent 5ce05b33d2
commit afbe884dad
2 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,5 @@
import { GlobalConfig } from '@n8n/config';
import convict from 'convict';
import dotenv from 'dotenv';
import { flatten } from 'flat';
import { readFileSync } from 'fs';
import merge from 'lodash/merge';
@@ -22,8 +21,6 @@ if (inE2ETests) {
process.env.N8N_PUBLIC_API_DISABLED = 'true';
process.env.SKIP_STATISTICS_EVENTS = 'true';
process.env.N8N_SECURE_COOKIE = 'false';
} else {
dotenv.config();
}
// Load schema after process.env has been overwritten