Files
picoclaw/web/backend/api/exec_windows.go
T
SiYue e1863234f0 fix(launcher): hide windows child-process console flashes
- hide windows when launching gateway process from launcher

- hide windows for powershell/tasklist process inspection commands
2026-04-24 23:31:04 +08:00

25 lines
413 B
Go

//go:build windows
package api
import (
"os/exec"
"syscall"
)
func launcherExecCommand(name string, args ...string) *exec.Cmd {
cmd := exec.Command(name, args...)
applyLauncherWindowsProcAttrs(cmd)
return cmd
}
func applyLauncherWindowsProcAttrs(cmd *exec.Cmd) {
if cmd == nil {
return
}
if cmd.SysProcAttr == nil {
cmd.SysProcAttr = &syscall.SysProcAttr{}
}
cmd.SysProcAttr.HideWindow = true
}