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.
18 lines
305 B
Go
18 lines
305 B
Go
//go:build windows
|
|
|
|
package api
|
|
|
|
import (
|
|
"os/exec"
|
|
|
|
"github.com/sipeed/picoclaw/web/backend/utils"
|
|
)
|
|
|
|
func launcherExecCommand(name string, args ...string) *exec.Cmd {
|
|
return utils.LauncherExecCommand(name, args...)
|
|
}
|
|
|
|
func applyLauncherProcAttrs(cmd *exec.Cmd) {
|
|
utils.ApplyLauncherProcAttrs(cmd)
|
|
}
|