Closed
Description
Steps to reproduce
Create a script file and include the " #requires -version 5" line before the code.
Open PowerShell v6.0.0_Alpha-13
run .scriptfile.ps1
Expected behavior
Script file will error-out with the message:
"... cannot be run because it contained a "#requires" statement for Windows PowerShell 5.0..."
Actual behavior
It continues to execute the script file.
Environment data
OS: Windows 10 Pro Insider Preview 14971
PS C:\Program Files\PowerShell\6.0.0.13> $PSVersionTable
Name Value
---- -----
CLRVersion
PSVersion 6.0.0-alpha
SerializationVersion 1.1.0.1
BuildVersion 3.0.0.0
GitCommitId v6.0.0-alpha.13
WSManStackVersion 3.0
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSEdition Core
PSRemotingProtocolVersion 2.3