* Properly handle stdout for redir

This commit is contained in:
Michaël Van Canneyt 2024-02-15 14:08:42 +01:00
parent 84e230f6e5
commit d45556666e

View File

@ -810,7 +810,10 @@ begin
P.CommandLine:=Progname + ' ' + ComLine;
P.InputDescriptor.FileName:=RedirStdIn;
P.OutputDescriptor.FileName:=RedirStdOut;
P.ErrorDescriptor.FileName:=RedirStdErr;
if RedirStdErr='stdout' then
P.Options:=P.options+[poStdErrToOutput]
else
P.ErrorDescriptor.FileName:=RedirStdErr;
P.Execute;
Result:=P.WaitOnExit(max_count);
if Result then