2022-05-04 23:58:49 +02:00
|
|
|
Prevent builtin extensions from being updated
|
|
|
|
|
|
|
|
Updating builtin extensions from the marketplace prevents us from patching them
|
|
|
|
(for example out GitHub authentication patches).
|
|
|
|
|
|
|
|
Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
|
|
|
===================================================================
|
|
|
|
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
|
|
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
2022-09-09 18:28:54 +02:00
|
|
|
@@ -236,6 +236,10 @@ export class Extension implements IExten
|
2022-06-21 23:51:46 +02:00
|
|
|
if (this.type === ExtensionType.System && this.productService.quality === 'stable') {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
+ // Do not update builtin extensions.
|
|
|
|
+ if (this.type !== ExtensionType.User) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) {
|
|
|
|
return false;
|
|
|
|
}
|
2022-09-15 23:49:28 +02:00
|
|
|
@@ -1121,6 +1125,10 @@ export class ExtensionsWorkbenchService
|
2022-05-04 23:58:49 +02:00
|
|
|
// Skip if check updates only for builtin extensions and current extension is not builtin.
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
+ if (installed.type !== ExtensionType.User) {
|
|
|
|
+ // Never update builtin extensions.
|
|
|
|
+ continue;
|
|
|
|
+ }
|
2022-06-21 23:51:46 +02:00
|
|
|
if (installed.isBuiltin && (!installed.local?.identifier.uuid || (!isWeb && this.productService.quality === 'stable'))) {
|
|
|
|
// Skip checking updates for a builtin extension if it does not has Marketplace identifier or the current product is VS Code Desktop stable.
|
2022-05-04 23:58:49 +02:00
|
|
|
continue;
|