diff options
author | Sandeep Somavarapu <sasomava@microsoft.com> | 2022-02-09 18:19:50 +0300 |
---|---|---|
committer | Sandeep Somavarapu <sasomava@microsoft.com> | 2022-02-09 20:09:26 +0300 |
commit | 290b54d29c744dd6f8fc8cb7a4252a69fcb2af59 (patch) | |
tree | 1a4665eaef619c4e9522c6d53a02100bfb568161 /src/vs/platform/extensionManagement/node/extensionManagementService.ts | |
parent | 670039b0f17743bbfc489d32530e61656f8c84a3 (diff) |
#142040 fix storing preRelease flag
Diffstat (limited to 'src/vs/platform/extensionManagement/node/extensionManagementService.ts')
-rw-r--r-- | src/vs/platform/extensionManagement/node/extensionManagementService.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index a76149b899b..c522d9c1de2 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -12,6 +12,7 @@ import { isLinux, isMacintosh, platform } from 'vs/base/common/platform'; import { arch } from 'vs/base/common/process'; import { joinPath } from 'vs/base/common/resources'; import * as semver from 'vs/base/common/semver/semver'; +import { isBoolean } from 'vs/base/common/types'; import { URI } from 'vs/base/common/uri'; import { generateUuid } from 'vs/base/common/uuid'; import * as pfs from 'vs/base/node/pfs'; @@ -292,7 +293,10 @@ class InstallGalleryExtensionTask extends AbstractInstallExtensionTask { installableExtension.metadata.isMachineScoped = this.options.isMachineScoped || existingExtension?.isMachineScoped; installableExtension.metadata.isBuiltin = this.options.isBuiltin || existingExtension?.isBuiltin; installableExtension.metadata.isPreReleaseVersion = this.gallery.properties.isPreReleaseVersion; - installableExtension.metadata.preRelease = this.gallery.hasPreReleaseVersion ? this.gallery.properties.isPreReleaseVersion : (existingExtension?.preRelease || this.options.installPreReleaseVersion); + installableExtension.metadata.preRelease = this.gallery.properties.isPreReleaseVersion || + (isBoolean(this.options.installPreReleaseVersion) + ? this.options.installPreReleaseVersion /* Respect the passed flag */ + : existingExtension?.preRelease /* Respect the existing pre-release flag if it was set */); try { const local = await this.installExtension(installableExtension, token); |