Fix the check when reading input in NativeCommandProcessor (#19614)

This commit is contained in:
Patrick Meinecke
2023-05-04 12:00:18 -07:00
committed by GitHub
parent 9d36e139bc
commit 16c6030f06
@@ -435,8 +435,8 @@ namespace System.Management.Automation
{
// If upstream is a native command it'll be writing directly to our stdin stream
// so we can skip reading here.
if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSNativeCommandPreserveBytePipe)
&& !UpstreamIsNativeCommand)
if (!ExperimentalFeature.IsEnabled(ExperimentalFeature.PSNativeCommandPreserveBytePipe)
|| !UpstreamIsNativeCommand)
{
while (Read())
{