File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -760,13 +760,13 @@ function Invoke-Program() {
760
760
if ($OutNull ) {
761
761
& $Executable @ExecutableArgs | Out-Null
762
762
} elseif ($Silent ) {
763
- & $Executable @ExecutableArgs * > $null
763
+ & $Executable @ExecutableArgs | Out-Null 2>&1 | Out-Null
764
764
} elseif ($OutFile -and $ErrorFile ) {
765
- & $Executable @ExecutableArgs > $OutFile 2> $ErrorFile
765
+ & $Executable @ExecutableArgs | Out-File - FilePath $OutFile - Encoding UTF8 2>&1 | Out-File - FilePath $ErrorFile - Encoding UTF8
766
766
} elseif ($OutFile ) {
767
- & $Executable @ExecutableArgs > $OutFile
767
+ & $Executable @ExecutableArgs | Out-File - FilePath $OutFile - Encoding UTF8
768
768
} elseif ($ErrorFile ) {
769
- & $Executable @ExecutableArgs 2> $ErrorFile
769
+ & $Executable @ExecutableArgs 2>&1 | Out-File - FilePath $ErrorFile - Encoding UTF8
770
770
} else {
771
771
& $Executable @ExecutableArgs
772
772
}
You can’t perform that action at this time.
0 commit comments