File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/vs/workbench/contrib/extensions/browser Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ import { ExtensionsCompletionItemsProvider } from 'vs/workbench/contrib/extensio
7474import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput' ;
7575import { Event } from 'vs/base/common/event' ;
7676import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite' ;
77+ import { getIdAndVersion } from 'vs/platform/extensionManagement/common/extensionManagementCLIService' ;
7778
7879// Singletons
7980registerSingleton ( IExtensionsWorkbenchService , ExtensionsWorkbenchService ) ;
@@ -289,7 +290,8 @@ CommandsRegistry.registerCommand({
289290 const extensionGalleryService = accessor . get ( IExtensionGalleryService ) ;
290291 try {
291292 if ( typeof arg === 'string' ) {
292- const [ extension ] = await extensionGalleryService . getExtensions ( [ { id : arg } ] , CancellationToken . None ) ;
293+ const [ id , version ] = getIdAndVersion ( arg ) ;
294+ const [ extension ] = await extensionGalleryService . getExtensions ( [ { id, version } ] , CancellationToken . None ) ;
293295 if ( extension ) {
294296 await extensionManagementService . installFromGallery ( extension , options ?. donotSync ? { isMachineScoped : true } : undefined ) ;
295297 } else {
You can’t perform that action at this time.
0 commit comments