fix: correctly pass extension's id when version is also provided#279630
Merged
sandy081 merged 2 commits intomicrosoft:mainfrom Dec 16, 2025
Merged
fix: correctly pass extension's id when version is also provided#279630sandy081 merged 2 commits intomicrosoft:mainfrom
sandy081 merged 2 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the workbench.extensions.installExtension command where the extension ID with version (e.g., dbaeumer.vscode-eslint@2.4.4) was being passed to extensionsWorkbenchService.install() instead of just the ID (e.g., dbaeumer.vscode-eslint). The fix ensures that after splitting the argument into ID and version, only the ID is passed to the install function, while the version is passed separately in the options object.
Key Changes:
- Fixed the
workbench.extensions.installExtensioncommand to pass only the extension ID toextensionsWorkbenchService.install()when a version is specified, instead of passing the full argument with version.
sandy081
approved these changes
Dec 9, 2025
Tyriar
approved these changes
Dec 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
When calling the
workbench.extensions.installExtensioncommand to install the extensiondbaeumer.vscode-eslint@2.4.4,argargument is split as[id, version]with:vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
Line 408 in 1e352e9
extensionsWorkbenchService.installfunction is called with:arg(dbaeumer.vscode-eslint@2.4.4)id(dbaeumer.vscode-eslint)The
installfunction is expecting anid:vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
Line 2454 in 1e352e9