Skip to content

Commit 1ce5da3

Browse files
committed
Prevent builtin extensions from updating
1 parent a78f8b5 commit 1ce5da3

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Prevent builtin extensions from being updated
2+
3+
Updating builtin extensions from the marketplace prevents us from patching them
4+
(for example out GitHub authentication patches).
5+
6+
Index: code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
7+
===================================================================
8+
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
9+
+++ code-server/lib/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
10+
@@ -206,6 +206,9 @@ export class Extension implements IExten
11+
if (!this.gallery || !this.local) {
12+
return false;
13+
}
14+
+ if (this.type !== ExtensionType.User) {
15+
+ return false;
16+
+ }
17+
if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) {
18+
return false;
19+
}
20+
@@ -1057,6 +1060,10 @@ export class ExtensionsWorkbenchService
21+
// Skip if check updates only for builtin extensions and current extension is not builtin.
22+
continue;
23+
}
24+
+ if (installed.type !== ExtensionType.User) {
25+
+ // Never update builtin extensions.
26+
+ continue;
27+
+ }
28+
if (installed.isBuiltin && !installed.local?.identifier.uuid) {
29+
// Skip if the builtin extension does not have Marketplace id
30+
continue;

patches/series

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ base-path.diff
33
proposed-api.diff
44
marketplace.diff
55
webview.diff
6+
disable-builtin-ext-update.diff
67
insecure-notification.diff
78
update-check.diff
89
logout.diff

0 commit comments

Comments
 (0)