fix: remove leading zeros before passing version to extension (#2302)

This commit is contained in:
Baptiste Augrain
2025-04-05 05:08:47 +02:00
committed by GitHub
parent d4b6a02c80
commit 14e40dbd37

View File

@@ -21,3 +21,12 @@ index cd8610d..2d928b1 100644
- .pipe(replace('@@VERSION@@', commit.substr(0, 8)))
+ .pipe(replace('@@VERSION@@', packageJson.version))
// Possible run-on values https://snapcraft.io/docs/architectures
diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts
index f13affa..60f0ccb 100644
--- a/src/vs/workbench/api/common/extHost.api.impl.ts
+++ b/src/vs/workbench/api/common/extHost.api.impl.ts
@@ -1548,3 +1548,3 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return <typeof vscode>{
- version: initData.version,
+ version: initData.version.replace(/\.0+/g, '.'),
// namespaces