Skip to content

Commit

Permalink
Fix Mac update loop (#25694) (#25695)
Browse files Browse the repository at this point in the history
  • Loading branch information
caohai committed Jun 13, 2024
1 parent da85ed3 commit 8825ec2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/vs/platform/update/electron-main/updateService.darwin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8825ec2

Please sign in to comment.