xetup/internal/runner/hidecmd_windows.go
X9 Dev 66dfdbf44c
All checks were successful
release / build-and-release (push) Successful in 25s
runner: hide PowerShell window + filter PS error noise from log
- HideWindow: true in SysProcAttr (Windows) prevents powershell.exe
  from opening a console window over the GUI
- skipPSNoiseLine filters multi-line PS error blocks (At line:, CategoryInfo,
  FullyQualifiedErrorId, VERBOSE: etc.) - errors still appear via Write-Log

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 14:39:36 +02:00

14 lines
320 B
Go

//go:build windows
package runner
import (
"os/exec"
"syscall"
)
// hideWindow prevents the child process from creating a visible console window.
// Without this, powershell.exe opens a full-size window on top of the GUI.
func hideWindow(cmd *exec.Cmd) {
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
}