Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[SemanticVersion] comparison with [Version] constructed with just major+minor #3786

Copy link
Copy link
@nightroman

Description

@nightroman
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.