-CommandWithArgs
CLI parameter doesn't work with -
(code provided via stdin)
#22891
Open
5 tasks done
Labels
Needs-Triage
The issue is new and needs to be triaged by a work group.
Prerequisites
Steps to reproduce
Note: To run the repro, experimental feature
PSCommandWithArgs
must be enabled.Note:
$ErrorActionPreference = 'Stop'
ignored, when command read from stdin. #21808 (comment)Expected behavior
Args: foo bar
Actual behavior
The CLI call fails:
'-' was specified with the -Command parameter; no other arguments to -Command are permitted.
That is,
-CommandWithArgs
unexpectedly behaves like-Command
, even though there's no good reason to prevent this combination of arguments.Error details
No response
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: