From 8825ec21e67a34ede00e4f02a4afc692eb6cab61 Mon Sep 17 00:00:00 2001 From: Hai Cao Date: Thu, 13 Jun 2024 13:32:04 -0700 Subject: [PATCH] Fix Mac update loop (#25694) (#25695) --- .../update/electron-main/updateService.darwin.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/vs/platform/update/electron-main/updateService.darwin.ts b/src/vs/platform/update/electron-main/updateService.darwin.ts index 4100f96e2810..cc0174bc7186 100644 --- a/src/vs/platform/update/electron-main/updateService.darwin.ts +++ b/src/vs/platform/update/electron-main/updateService.darwin.ts @@ -81,23 +81,26 @@ export class DarwinUpdateService extends AbstractUpdateService implements IRelau } protected buildUpdateFeedUrl(quality: string): string | undefined { - let url: string; + let feedUrl: string; // {{SQL CARBON EDIT}} - Use the metadata files from the Download Center as the update feed. if (!this.productService.darwinUniversalAssetId) { - url = process.arch === 'x64' ? this.productService.updateMetadataMacUrl : this.productService.updateMetadataMacArmUrl; + feedUrl = process.arch === 'x64' ? this.productService.updateMetadataMacUrl : this.productService.updateMetadataMacArmUrl; } else { - url = this.productService.updateMetadataMacUniversalUrl; + feedUrl = this.productService.updateMetadataMacUniversalUrl; } try { - electron.autoUpdater.setFeedURL({ url }); + electron.autoUpdater.setFeedURL({ + url: feedUrl, + serverType: 'json', + }); } catch (e) { // application is very likely not signed this.logService.error('Failed to set update feed URL', e); return undefined; } - return url; + return feedUrl; } protected doCheckForUpdates(context: any): void {