Fix version check in crash handler

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2024-02-28 11:48:12 -06:00 committed by GitHub
parent d6e21e27f9
commit 08b516bf5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@ import z from 'zod';
import type { LoggerType } from '../ts/types/Logging';
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';
const dumpSchema = z
@ -68,7 +68,7 @@ export function setup(
showDebugLogWindow: () => Promise<void>,
forceEnable = false
): void {
const isEnabled = isAlpha(app.getVersion()) || forceEnable;
const isEnabled = !isProduction(app.getVersion()) || forceEnable;
if (isEnabled) {
getLogger().info(`crashReporter: ${forceEnable ? 'force ' : ''}enabled`);