提交 b7267931 编写于 作者: L Leonardo Braga

Handle --enable-proposed-api without extension IDs as "enable all"

Fixes #48521
上级 3669afe7
......@@ -160,7 +160,7 @@ const extensionsHelp: { [name: string]: string; } = {
'--show-versions': localize('showVersions', "Show versions of installed extensions, when using --list-extension."),
'--install-extension (<extension-id> | <extension-vsix-path>)': localize('installExtension', "Installs an extension."),
'--uninstall-extension (<extension-id> | <extension-vsix-path>)': localize('uninstallExtension', "Uninstalls an extension."),
'--enable-proposed-api <extension-id>': localize('experimentalApis', "Enables proposed API features for an extension.")
'--enable-proposed-api (<extension-id>)': localize('experimentalApis', "Enables proposed API features for extensions. Can receive one or more extension IDs to enable individually.")
};
const troubleshootingHelp: { [name: string]: string; } = {
......
......@@ -544,9 +544,12 @@ export class ExtensionService extends Disposable implements IExtensionService {
const extensionsToDisable: IExtensionIdentifier[] = [];
const userMigratedSystemExtensions: IExtensionIdentifier[] = [{ id: BetterMergeId }];
const enableProposedApiForAll = !this._environmentService.isBuilt || (!!this._environmentService.extensionDevelopmentPath && product.nameLong.indexOf('Insiders') >= 0);
const enableProposedApiFor: string | string[] = this._environmentService.args['enable-proposed-api'] || [];
const enableProposedApiForAll = !this._environmentService.isBuilt ||
(!!this._environmentService.extensionDevelopmentPath && product.nameLong.indexOf('Insiders') >= 0) ||
(enableProposedApiFor.length === 0 && 'enable-proposed-api' in this._environmentService.args);
for (const extension of allExtensions) {
const isExtensionUnderDevelopment = this._environmentService.isExtensionDevelopment && extension.extensionLocation.scheme === Schemas.file && extension.extensionLocation.fsPath.indexOf(this._environmentService.extensionDevelopmentPath) === 0;
// Do not disable extensions under development
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册