mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Make sure both stdout and stderr can be redirected from a native executable (#20997)
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.IO;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
namespace TestExe
|
||||
{
|
||||
@@ -36,6 +37,10 @@ namespace TestExe
|
||||
case "-stderr":
|
||||
Console.Error.WriteLine(args[1]);
|
||||
break;
|
||||
case "-stderrandout":
|
||||
Console.WriteLine(args[1]);
|
||||
Console.Error.WriteLine(new string(args[1].ToCharArray().Reverse().ToArray()));
|
||||
break;
|
||||
case "-readbytes":
|
||||
ReadBytes();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user