fix: Enable crash journal only in production mode (no-changelog) (#4948)
* consolidate various `NODE_ENV` checks in the `cli` package * enable crash journal only in production
This commit is contained in:
committed by
GitHub
parent
2a7cb0192a
commit
323bd78067
@@ -7,8 +7,7 @@ import { tmpdir } from 'os';
|
||||
import { mkdtempSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
import { schema } from './schema';
|
||||
|
||||
const inE2ETests = process.env.E2E_TESTS === 'true';
|
||||
import { inTest, inE2ETests } from '@/constants';
|
||||
|
||||
if (inE2ETests) {
|
||||
// Skip loading config from env variables in end-to-end tests
|
||||
@@ -36,10 +35,10 @@ config.getEnv = config.get;
|
||||
if (!inE2ETests) {
|
||||
// Overwrite default configuration with settings which got defined in
|
||||
// optional configuration files
|
||||
const { N8N_CONFIG_FILES, NODE_ENV } = process.env;
|
||||
const { N8N_CONFIG_FILES } = process.env;
|
||||
if (N8N_CONFIG_FILES !== undefined) {
|
||||
const configFiles = N8N_CONFIG_FILES.split(',');
|
||||
if (NODE_ENV !== 'test') {
|
||||
if (!inTest) {
|
||||
console.log(`\nLoading configuration overwrites from:\n - ${configFiles.join('\n - ')}\n`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user