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:
कारतोफ्फेलस्क्रिप्ट™
2022-12-16 15:27:49 +01:00
committed by GitHub
parent 2a7cb0192a
commit 323bd78067
7 changed files with 20 additions and 19 deletions

View File

@@ -3,6 +3,7 @@ import { LoggerProxy } from 'n8n-workflow';
import { getLogger, Logger } from '@/Logger';
import { User } from '@db/entities/User';
import * as Db from '@/Db';
import { inTest } from '@/constants';
export abstract class BaseCommand extends Command {
logger: Logger;
@@ -19,7 +20,7 @@ export abstract class BaseCommand extends Command {
}
async finally(): Promise<void> {
if (process.env.NODE_ENV === 'test') return;
if (inTest) return;
this.exit();
}