mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Change how 'isPreview' is determined for default cmdlets tests (#19650)
This commit is contained in:
@@ -18,7 +18,12 @@ Describe "Verify aliases and cmdlets" -Tags "CI" {
|
||||
$FullCLR = !$IsCoreCLR
|
||||
$CoreWindows = $IsCoreCLR -and $IsWindows
|
||||
$CoreUnix = $IsCoreCLR -and !$IsWindows
|
||||
$isPreview = $PSVersionTable.GitCommitId.Contains("preview")
|
||||
# If psversion can be converted to [version], then it is not a preview version.
|
||||
# We can't just use '$psversiontable.psversion -as [version]' because pwsh
|
||||
# will succeed with the conversion and add note properties to the version object.
|
||||
$psVersionAsVersion = $psversiontable.psversion.tostring() -as [version]
|
||||
$isRC = $psversiontable.psversion.tostring() -match "rc"
|
||||
$isPreview = -not ($isRC -or $psVersionAsVersion)
|
||||
if ($IsWindows) {
|
||||
$configPath = Join-Path -Path $env:USERPROFILE -ChildPath 'Documents' -AdditionalChildPath 'PowerShell'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user