mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
2861fd90ab
* fix(launcher): hide console flashes in all Windows child processes PR #2654 only applied HideWindow to child processes in gateway.go (powershell, tasklist, ps). Several other files still use exec.Command directly, causing visible console windows on Windows. - startup.go: reg query/add/delete for autostart registry - version.go: picoclaw version subcommand - runtime.go: rundll32 for browser launch - onboard.go: picoclaw onboard subcommand Add launcherExecCommand to the utils package (matching the api package pattern) and replace all bare exec.Command calls on Windows paths. * refactor: consolidate launcherExecCommand into utils package Export LauncherExecCommand and ApplyLauncherProcAttrs from the utils package as the single source of truth. The api package now imports and delegates to these exported functions, eliminating code duplication. Addresses review feedback from imguoguo on PR #3061.
15 lines
385 B
Go
15 lines
385 B
Go
//go:build !windows
|
|
|
|
package utils
|
|
|
|
import "os/exec"
|
|
|
|
// LauncherExecCommand creates an exec.Cmd. On non-Windows platforms, this is
|
|
// a simple wrapper around exec.Command.
|
|
func LauncherExecCommand(name string, args ...string) *exec.Cmd {
|
|
return exec.Command(name, args...)
|
|
}
|
|
|
|
// ApplyLauncherProcAttrs is a no-op on non-Windows platforms.
|
|
func ApplyLauncherProcAttrs(_ *exec.Cmd) {}
|