-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-AnsweredThe question is answered.The question is answered.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
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
Metadata
Metadata
Assignees
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-AnsweredThe question is answered.The question is answered.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
