mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Simplify interaction with updater and main process
This commit is contained in:
+8
-4
@@ -127,6 +127,7 @@ import { getAppErrorIcon } from '../ts/util/getAppErrorIcon';
|
||||
import { promptOSAuth } from '../ts/util/os/promptOSAuthMain';
|
||||
|
||||
const log = createLogger('app/main');
|
||||
const updaterLog = log.child('updater');
|
||||
|
||||
const animationSettings = systemPreferences.getAnimationSettings();
|
||||
|
||||
@@ -1156,20 +1157,23 @@ async function readyForUpdates() {
|
||||
);
|
||||
},
|
||||
getMainWindow,
|
||||
logger: log,
|
||||
logger: updaterLog,
|
||||
sql,
|
||||
});
|
||||
} catch (error) {
|
||||
log.error('Error starting update checks:', Errors.toLogFormat(error));
|
||||
updaterLog.error(
|
||||
'Error starting update checks:',
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async function forceUpdate() {
|
||||
try {
|
||||
log.info('starting force update');
|
||||
updaterLog.info('starting force update');
|
||||
await updater.force();
|
||||
} catch (error) {
|
||||
log.error('Error during force update:', Errors.toLogFormat(error));
|
||||
updaterLog.error('Error during force update:', Errors.toLogFormat(error));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user