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 @@ -765,13 +765,13 @@ function Invoke-Program() {
765
765
if ($OutNull ) {
766
766
& $Executable @ExecutableArgs | Out-Null
767
767
} elseif ($Silent ) {
768
- & $Executable @ExecutableArgs * > $null
768
+ & $Executable @ExecutableArgs | Out-Null 2>&1 | Out-Null
769
769
} elseif ($OutFile -and $ErrorFile ) {
770
- & $Executable @ExecutableArgs > $OutFile 2> $ErrorFile
770
+ & $Executable @ExecutableArgs | Out-File - FilePath $OutFile - Encoding UTF8 2>&1 | Out-File - FilePath $ErrorFile - Encoding UTF8
771
771
} elseif ($OutFile ) {
772
- & $Executable @ExecutableArgs > $OutFile
772
+ & $Executable @ExecutableArgs | Out-File - FilePath $OutFile - Encoding UTF8
773
773
} elseif ($ErrorFile ) {
774
- & $Executable @ExecutableArgs 2> $ErrorFile
774
+ & $Executable @ExecutableArgs 2>&1 | Out-File - FilePath $ErrorFile - Encoding UTF8
775
775
} else {
776
776
& $Executable @ExecutableArgs
777
777
}
You can’t perform that action at this time.
0 commit comments