From 929304770734b4a7ed44fba6c88dd83c06b2f01b Mon Sep 17 00:00:00 2001 From: Himanshu Date: Wed, 20 Nov 2024 19:23:52 +0530 Subject: [PATCH] disable-fast-updates --- product.json | 3 ++- .../common/update.config.contribution.ts | 2 +- .../electron-main/updateService.win32.ts | 20 ++++++++++--------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/product.json b/product.json index 372f65dd4af20..55c93c1915957 100644 --- a/product.json +++ b/product.json @@ -2382,5 +2382,6 @@ "vs/code/electron-sandbox/workbench/workbench.html": "MOHfHsuI+CL4nPwyAQjuFCAjFomNep+vcvjL0sLDlbw", "vs/code/electron-sandbox/workbench/workbench.js": "UfEYJUwE/3rVxokZpMqXUk+OC+ZVfikR++K0yTZ+on8" }, - "version": "1.91.1" + "version": "1.91.1", + "target": "user" } diff --git a/src/vs/platform/update/common/update.config.contribution.ts b/src/vs/platform/update/common/update.config.contribution.ts index 2856d209c4901..7065826c55918 100644 --- a/src/vs/platform/update/common/update.config.contribution.ts +++ b/src/vs/platform/update/common/update.config.contribution.ts @@ -42,7 +42,7 @@ configurationRegistry.registerConfiguration({ }, 'update.enableWindowsBackgroundUpdates': { type: 'boolean', - default: true, + default: false, scope: ConfigurationScope.APPLICATION, title: localize('enableWindowsBackgroundUpdatesTitle', "Enable Background Updates on Windows"), description: localize('enableWindowsBackgroundUpdates', "Enable to download and install new VS Code versions in the background on Windows."), diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts index 4c49a758185db..ee1f827c75f52 100644 --- a/src/vs/platform/update/electron-main/updateService.win32.ts +++ b/src/vs/platform/update/electron-main/updateService.win32.ts @@ -155,15 +155,17 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun }).then(packagePath => { this.availableUpdate = { packagePath }; this.setState(State.Downloaded(update)); - - const fastUpdatesEnabled = this.configurationService.getValue('update.enableWindowsBackgroundUpdates'); - if (fastUpdatesEnabled) { - if (this.productService.target === 'user') { - this.doApplyUpdate(); - } - } else { - this.setState(State.Ready(update)); - } + // NOTE: pear does not support fast updates. so we are setting the state to ready. + this.setState(State.Ready(update)); + + // const fastUpdatesEnabled = this.configurationService.getValue('update.enableWindowsBackgroundUpdates'); + // if (fastUpdatesEnabled) { + // if (this.productService.target === 'user') { + // this.doApplyUpdate(); + // } + // } else { + // this.setState(State.Ready(update)); + // } }); }); })