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,
|
"mergeASARs": true,
|
||||||
"releaseInfo": {
|
"releaseInfo": {
|
||||||
"vendor": {
|
"vendor": {
|
||||||
"minOSVersion": "19.0.0",
|
"minOSVersion": "19.0.0"
|
||||||
"requireManualUpdate": false,
|
|
||||||
"requireUserConfirmation": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"singleArchFiles": "node_modules/@signalapp/{libsignal-client/prebuilds/**,ringrtc/build/**}",
|
"singleArchFiles": "node_modules/@signalapp/{libsignal-client/prebuilds/**,ringrtc/build/**}",
|
||||||
|
@ -399,9 +397,7 @@
|
||||||
],
|
],
|
||||||
"releaseInfo": {
|
"releaseInfo": {
|
||||||
"vendor": {
|
"vendor": {
|
||||||
"minOSVersion": "10.0.10240",
|
"minOSVersion": "10.0.10240"
|
||||||
"requireManualUpdate": false,
|
|
||||||
"requireUserConfirmation": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"signDlls": true,
|
"signDlls": true,
|
||||||
|
|
|
@ -50,8 +50,8 @@ const INTERVAL = 30 * durations.MINUTE;
|
||||||
|
|
||||||
type JSONVendorSchema = {
|
type JSONVendorSchema = {
|
||||||
minOSVersion?: string;
|
minOSVersion?: string;
|
||||||
requireManualUpdate?: boolean;
|
requireManualUpdate?: 'true' | 'false';
|
||||||
requireUserConfirmation?: boolean;
|
requireUserConfirmation?: 'true' | 'false';
|
||||||
};
|
};
|
||||||
|
|
||||||
type JSONUpdateSchema = {
|
type JSONUpdateSchema = {
|
||||||
|
@ -285,7 +285,8 @@ export abstract class Updater {
|
||||||
|
|
||||||
await this.installUpdate(
|
await this.installUpdate(
|
||||||
updateFilePath,
|
updateFilePath,
|
||||||
!updateInfo.vendor?.requireUserConfirmation && this.canRunSilently()
|
updateInfo.vendor?.requireUserConfirmation !== 'true' &&
|
||||||
|
this.canRunSilently()
|
||||||
);
|
);
|
||||||
|
|
||||||
const mainWindow = this.getMainWindow();
|
const mainWindow = this.getMainWindow();
|
||||||
|
@ -402,7 +403,7 @@ export abstract class Updater {
|
||||||
|
|
||||||
const { vendor } = parsedYaml;
|
const { vendor } = parsedYaml;
|
||||||
if (vendor) {
|
if (vendor) {
|
||||||
if (vendor.requireManualUpdate) {
|
if (vendor.requireManualUpdate === 'true') {
|
||||||
this.logger.warn('checkForUpdates: manual update required');
|
this.logger.warn('checkForUpdates: manual update required');
|
||||||
this.markCannotUpdate(
|
this.markCannotUpdate(
|
||||||
new Error('yaml file has requireManualUpdate flag'),
|
new Error('yaml file has requireManualUpdate flag'),
|
||||||
|
|
Loading…
Reference in a new issue