Skip to content

Commit a275b4b

Browse files
authored
Fix Version Comparison Error in YamlCreate (#244669)
1 parent a55a54e commit a275b4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tools/YamlCreate.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ if ($Settings) {
190190
exit
191191
}
192192

193-
$ScriptHeader = '# Created with YamlCreate.ps1 v2.4.5'
193+
$ScriptHeader = '# Created with YamlCreate.ps1 v2.4.6'
194194
$ManifestVersion = '1.10.0'
195195
$PSDefaultParameterValues = @{ '*:Encoding' = 'UTF8' }
196196
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
@@ -1239,7 +1239,7 @@ Function Read-InstallerEntry {
12391239
} else {
12401240
$script:_returnValue = [ReturnValue]::new(400, 'Invalid Installer Type', "Value must exist in the enum - $(@($Patterns.ValidInstallerTypes -join ', '))", 2)
12411241
}
1242-
if ($_Installer['InstallerType'] -eq 'zip' -and $ManifestVersion -lt '1.4.0') {
1242+
if ($_Installer['InstallerType'] -eq 'zip' -and [version]$ManifestVersion -lt [version]'1.4.0') {
12431243
$script:_returnValue = [ReturnValue]::new(500, 'Zip Installer Not Supported', "Zip installers are only supported with ManifestVersion 1.4.0 or later. Current ManifestVersion: $ManifestVersion", 2)
12441244
}
12451245
} until ($script:_returnValue.StatusCode -eq [ReturnValue]::Success().StatusCode)

0 commit comments

Comments
 (0)