diff --git a/src/vs/platform/extensions/common/extensionValidator.ts b/src/vs/platform/extensions/common/extensionValidator.ts index 0a5e7d20d2193..cee5eaeedefc5 100644 --- a/src/vs/platform/extensions/common/extensionValidator.ts +++ b/src/vs/platform/extensions/common/extensionValidator.ts @@ -273,7 +273,7 @@ export function validateExtensionManifest(productVersion: string, productDate: P return validations; } if (typeof extensionManifest.main === 'undefined' && typeof extensionManifest.browser === 'undefined') { - validations.push([Severity.Error, nls.localize('extensionDescription.activationEvents2', "properties `{0}` and `{1}` must both be specified or must both be omitted", 'activationEvents', 'main')]); + validations.push([Severity.Error, nls.localize('extensionDescription.activationEvents2', "property `{0}` should be omitted if the extension doesn't have a `{1}` or `{2}` property.", 'activationEvents', 'main', 'browser')]); return validations; } } @@ -294,10 +294,6 @@ export function validateExtensionManifest(productVersion: string, productDate: P // not a failure case } } - if (typeof extensionManifest.activationEvents === 'undefined') { - validations.push([Severity.Error, nls.localize('extensionDescription.main3', "properties `{0}` and `{1}` must both be specified or must both be omitted", 'activationEvents', 'main')]); - return validations; - } } if (typeof extensionManifest.browser !== 'undefined') { if (typeof extensionManifest.browser !== 'string') { @@ -310,10 +306,6 @@ export function validateExtensionManifest(productVersion: string, productDate: P // not a failure case } } - if (typeof extensionManifest.activationEvents === 'undefined') { - validations.push([Severity.Error, nls.localize('extensionDescription.browser3', "properties `{0}` and `{1}` must both be specified or must both be omitted", 'activationEvents', 'browser')]); - return validations; - } } if (!semver.valid(extensionManifest.version)) {