SDA-4489 - Use correct url to validate (#2152)

This commit is contained in:
Kiran Niranjan 2024-05-27 19:05:44 +05:30 committed by GitHub
parent 0e7e3b9d64
commit 9901957c65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,10 +95,8 @@ export class AutoUpdate {
logger.info(
'auto-update-handler: update downloaded and isForceUpdate',
);
// Handle update and restart for macOS
if (isMac) {
windowHandler.setIsAutoUpdating(true);
}
// Handle update and restart
windowHandler.setIsAutoUpdating(true);
this.autoUpdater?.quitAndInstall();
return;
}
@ -386,10 +384,11 @@ export class AutoUpdate {
this.finalAutoUpdateChannel = autoUpdateChannel;
this.installVariant = installVariant;
const { url: userUrl } = config.getUserConfigFields(['url']);
const { url: globalUrl } = config.getGlobalConfigFields(['url']);
const url = userUrl ? userUrl : globalUrl;
const isCorp =
(windowHandler?.url &&
windowHandler.url.startsWith('https://corporate.symphony.com')) ||
false;
(url && url.startsWith('https://corporate.symphony.com')) || false;
// Corp should keep the ability to get auto-update channel from user config as top prio
if (isCorp && this.finalAutoUpdateChannel !== UpdateChannel.LATEST) {