refactor(windows): ensure output redirection for Invoke-LxsSibling and Invoke-LxsScript

This commit is contained in:
2026-09-09 15:33:47 -04:00
parent 1df5cdb0bb
commit d27bf49c40
2 changed files with 9 additions and 3 deletions
+4 -1
View File
@@ -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 }