diff --git a/src/vs/workbench/api/browser/mainThreadCLICommands.ts b/src/vs/workbench/api/browser/mainThreadCLICommands.ts index 156399cdf38..02076eb4492 100644 --- a/src/vs/workbench/api/browser/mainThreadCLICommands.ts +++ b/src/vs/workbench/api/browser/mainThreadCLICommands.ts @@ -20,7 +20,7 @@ import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IProductService } from 'vs/platform/product/common/productService'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; -import { canExecuteOnWorkspace, getExtensionKind } from 'vs/workbench/services/extensions/common/extensionsUtil'; +import { canExecuteOnWorkspace } from 'vs/workbench/services/extensions/common/extensionsUtil'; import { IExtensionManifest } from 'vs/workbench/workbench.web.api'; @@ -100,8 +100,7 @@ class RemoteExtensionCLIManagementService extends ExtensionManagementCLIService protected validateExtensionKind(manifest: IExtensionManifest, output: CLIOutput): boolean { if (!canExecuteOnWorkspace(manifest, this.productService, this.configurationService)) { - const extensionKinds = getExtensionKind(manifest, this.productService, this.configurationService); - output.log(localize('cannot be installed', "Cannot install '{0}' extension because it is declared as {1} extension kind and does not run in this setup.", getExtensionId(manifest.publisher, manifest.name), extensionKinds.map(e => `"${e}"`).join(', '))); + output.log(localize('cannot be installed', "Cannot install the '{0}' extension because it is declared to not run in this setup.", getExtensionId(manifest.publisher, manifest.name))); return false; } return true; diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts index c4a198c99a5..a8ee0aa6135 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts +++ b/src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts @@ -272,14 +272,7 @@ export class ExtensionManagementService extends Disposable implements IWorkbench return Promises.settled(servers.map(server => server.extensionManagementService.installFromGallery(gallery, installOptions))).then(([local]) => local); } - const extensionKinds = getExtensionKind(manifest, this.productService, this.configurationService); - if (this.extensionManagementServerService.remoteExtensionManagementServer) { - const error = new Error(localize('cannot be installed', "Cannot install '{0}' extension because it is declared as {1} extension kind and does not run in this setup.", gallery.displayName || gallery.name, extensionKinds.map(e => `"${e}"`).join(', '))); - error.name = INSTALL_ERROR_NOT_SUPPORTED; - return Promise.reject(error); - } - - const error = new Error(localize('cannot be installed', "Cannot install '{0}' extension because it is declared as {1} extension kind and does not run in this setup.", gallery.displayName || gallery.name, extensionKinds.map(e => `"${e}"`).join(', '))); + const error = new Error(localize('cannot be installed', "Cannot install the '{0}' extension because it is declared to not run in this setup.", gallery.displayName || gallery.name)); error.name = INSTALL_ERROR_NOT_SUPPORTED; return Promise.reject(error); }