2bfe15b3e9
* Update upstream Code to 1.70 * Update CSP hashes * Update comment on remote authority Also remove it from script-src since it is invalid anyway. * Use absolute path for disable download patch Just to keep it consistent with the other imports. We initially added the patch like this so it was not part of the upgrade but might as well fix it now. * Fix inability to change language while code-server is running Co-authored-by: Asher <ash@coder.com>
32 lines
1.5 KiB
Diff
32 lines
1.5 KiB
Diff
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
|
|
@@ -237,6 +237,10 @@ export class Extension implements IExten
|
|
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;
|
|
}
|
|
@@ -1122,6 +1126,10 @@ export class ExtensionsWorkbenchService
|
|
// 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;
|
|
+ }
|
|
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.
|
|
continue;
|