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