refactor(windows): ensure output redirection for Invoke-LxsSibling and Invoke-LxsScript
This commit is contained in:
+4
-1
@@ -224,8 +224,11 @@ function Invoke-LxsScript {
|
||||
Write-Host ''
|
||||
|
||||
$global:LASTEXITCODE = 0
|
||||
$code = 0
|
||||
try {
|
||||
& $target @Arguments
|
||||
# Out-Host keeps the child's success-stream output out of this
|
||||
# function's return value, which must be just the exit code.
|
||||
& $target @Arguments | Out-Host
|
||||
$code = $LASTEXITCODE
|
||||
} finally {
|
||||
if ($temp) { Remove-Item $temp -Force -ErrorAction SilentlyContinue }
|
||||
|
||||
Reference in New Issue
Block a user