-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
Steps to reproduce
#requires-modules psworkflow
#requiresCrazyThings -psed desktopThe #Requires directive doesn't seem to require some kind of separation from its keyword to the next token, but not providing that separation causes an error anyway.
PS C:\> #requiresCrazyThings -psed desktop
At line:1 char:2
+ #requiresCrazyThings -psed desktop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cannot process the #requires statement because it is not in the correct format.
The #requires statement must be in one of the following formats:
"#requires -shellid <shellID>"
"#requires -version <major.minor>"
"#requires -psedition <edition>"
"#requires -pssnapin <psSnapInName> [-version <major.minor>]"
"#requires -modules <ModuleSpecification>"
"#requires -runasadministrator"
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ScriptRequiresInvalidFormat
PS C:\>
I am just not sure this is right. A inexperienced user could stumble across this by accident thinking he's just entering a comment. I have seen plenty of reports already of new users who are confused when the editor starts highlighting items in a comment, turning them in as bug reports.
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime