Fix version check in crash handler
This commit is contained in:
parent
abad547c32
commit
c64aa86736
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ import z from 'zod';
|
||||||
|
|
||||||
import type { LoggerType } from '../ts/types/Logging';
|
import type { LoggerType } from '../ts/types/Logging';
|
||||||
import * as Errors from '../ts/types/errors';
|
import * as Errors from '../ts/types/errors';
|
||||||
import { isAlpha } from '../ts/util/version';
|
import { isProduction } from '../ts/util/version';
|
||||||
import OS from '../ts/util/os/osMain';
|
import OS from '../ts/util/os/osMain';
|
||||||
|
|
||||||
const dumpSchema = z
|
const dumpSchema = z
|
||||||
|
@ -68,7 +68,7 @@ export function setup(
|
||||||
showDebugLogWindow: () => Promise<void>,
|
showDebugLogWindow: () => Promise<void>,
|
||||||
forceEnable = false
|
forceEnable = false
|
||||||
): void {
|
): void {
|
||||||
const isEnabled = isAlpha(app.getVersion()) || forceEnable;
|
const isEnabled = !isProduction(app.getVersion()) || forceEnable;
|
||||||
|
|
||||||
if (isEnabled) {
|
if (isEnabled) {
|
||||||
getLogger().info(`crashReporter: ${forceEnable ? 'force ' : ''}enabled`);
|
getLogger().info(`crashReporter: ${forceEnable ? 'force ' : ''}enabled`);
|
||||||
|
|
Loading…
Reference in a new issue