-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
This may or may not be intentional.
I was just looking at the code here for completely unrelated reasons:
https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs#L569
I noticed that (in contrast to Powershell 5.1), a combination of / and - for command line parameters is now allowed.
According to all documentation (in-code and external), one is supposed to pick between -
, --
and /
, no combination is ever mentioned.
However, the flow of the code also allows for /-
.
Is this meant to be possible?
Steps to reproduce
pwsh.exe /-enc JwBUAGgAaQBzACAAaQBzACAAYQAgAHQAZQBzAHQALgAnAA==
Expected behavior
Invalid combination of / and -
Actual behavior
Execution of command
> pwsh.exe /-enc JwBUAGgAaQBzACAAaQBzACAAYQAgAHQAZQBzAHQALgAnAA==
This is a test
Environment data
Name Value
---- -----
PSVersion 7.0.0
PSEdition Core
GitCommitId 7.0.0
OS Microsoft Windows 10.0.14393
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS: I had a hard time searching for this, since symbols are not really searchable in GitHub. Apologies if this issue already exists.