Fix boolean treatment in updater
This commit is contained in:
parent
e3efb48960
commit
02468d8a56
2 changed files with 7 additions and 10 deletions
|
@ -356,9 +356,7 @@
|
|||
"mergeASARs": true,
|
||||
"releaseInfo": {
|
||||
"vendor": {
|
||||
"minOSVersion": "19.0.0",
|
||||
"requireManualUpdate": false,
|
||||
"requireUserConfirmation": false
|
||||
"minOSVersion": "19.0.0"
|
||||
}
|
||||
},
|
||||
"singleArchFiles": "node_modules/@signalapp/{libsignal-client/prebuilds/**,ringrtc/build/**}",
|
||||
|
@ -399,9 +397,7 @@
|
|||
],
|
||||
"releaseInfo": {
|
||||
"vendor": {
|
||||
"minOSVersion": "10.0.10240",
|
||||
"requireManualUpdate": false,
|
||||
"requireUserConfirmation": false
|
||||
"minOSVersion": "10.0.10240"
|
||||
}
|
||||
},
|
||||
"signDlls": true,
|
||||
|
|
|
@ -50,8 +50,8 @@ const INTERVAL = 30 * durations.MINUTE;
|
|||
|
||||
type JSONVendorSchema = {
|
||||
minOSVersion?: string;
|
||||
requireManualUpdate?: boolean;
|
||||
requireUserConfirmation?: boolean;
|
||||
requireManualUpdate?: 'true' | 'false';
|
||||
requireUserConfirmation?: 'true' | 'false';
|
||||
};
|
||||
|
||||
type JSONUpdateSchema = {
|
||||
|
@ -285,7 +285,8 @@ export abstract class Updater {
|
|||
|
||||
await this.installUpdate(
|
||||
updateFilePath,
|
||||
!updateInfo.vendor?.requireUserConfirmation && this.canRunSilently()
|
||||
updateInfo.vendor?.requireUserConfirmation !== 'true' &&
|
||||
this.canRunSilently()
|
||||
);
|
||||
|
||||
const mainWindow = this.getMainWindow();
|
||||
|
@ -402,7 +403,7 @@ export abstract class Updater {
|
|||
|
||||
const { vendor } = parsedYaml;
|
||||
if (vendor) {
|
||||
if (vendor.requireManualUpdate) {
|
||||
if (vendor.requireManualUpdate === 'true') {
|
||||
this.logger.warn('checkForUpdates: manual update required');
|
||||
this.markCannotUpdate(
|
||||
new Error('yaml file has requireManualUpdate flag'),
|
||||
|
|
Loading…
Reference in a new issue