-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
Tried packages:
- PowerShell-6.0.0-beta.1-win10-win2016-x64.zip
- PowerShell-6.0.0-beta.1-win81-win2012r2-x64.zip
This issue might be related to #3696
As far as I understand, expressions $psversiontable.psversion -gt "3.0" were fixed.
But the similar expressions $psversiontable.psversion -gt ([version]"3.0") do not work:
Could not compare "6.0.0-beta" to "3.0". Error: "Cannot convert value "3.0" to type
"System.Management.Automation.SemanticVersion". Error: "Cannot process argument because the value of argument
"version" is not valid. Change the value of the "version" argument and run the operation again.""
At line:1 char:1
+ $psversiontable.psversion -gt ([version]"3.0")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : ComparisonFailure
In other words, [SemanticVersion] comparison with [Version] constructed with just major+minor does not work.
mklement0
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime