Powershell: #requires -version 6.2 throws on 7.0.0-preview.1

Created on 19 Jun 2019  Â·  3Comments  Â·  Source: PowerShell/PowerShell

Steps to reproduce

Add a #requires version statement with 6.2 to a script and run on 7.0.0-preview.1

#requires -version 6.2

Expected behavior

works

Actual behavior

image

Environment data


Name                           Value
----                           -----
PSVersion                      7.0.0-preview.1
PSEdition                      Core
GitCommitId                    7.0.0-preview.1
OS                             Darwin 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.…
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Issue-Question Resolution-Fixed

Most helpful comment

After some digging I found this issue here I'll see if I can fix it myself

All 3 comments

Interesting, works only till 6.0, fails for 6.1/2.

After some digging I found this issue here I'll see if I can fix it myself

:tada:This issue was addressed in #9943, which has now been successfully released as v7.0.0-preview.3.:tada:

Handy links:

Was this page helpful?
0 / 5 - 0 ratings