fix(mac): resolve duplicate symbols blocking darwin/linux builds + add Mac tests. Remove duplicate launchProcessGuard from guard_unix.go (kept richer health_unix.go shell-loop version using pgrep -f). Remove duplicate applyDetachedStart from exec_stub.go (kept platform_unix.go impl that clears stdio). Add silent_stub.go for !windows so silentCombinedOutput/silentOutput/silentRun compile on Mac. All 4 targets now build: darwin/arm64, darwin/amd64, linux/amd64, linux/arm64. New tests: workerProcessRunning, applyDetachedStart stdio clearing, PersistenceKeyName, HostOSVersion, LaunchAgent plist content, silent stub exec wrappers.
This commit is contained in:
28
agent/client/silent_stub.go
Normal file
28
agent/client/silent_stub.go
Normal file
@@ -0,0 +1,28 @@
|
||||
//go:build !windows
|
||||
|
||||
package client
|
||||
|
||||
import "os/exec"
|
||||
|
||||
// On non-Windows there are no console windows to hide; these are
|
||||
// plain exec wrappers that mirror the silent_windows.go signatures.
|
||||
|
||||
func silentCmd(name string, arg ...string) *exec.Cmd {
|
||||
return exec.Command(name, arg...)
|
||||
}
|
||||
|
||||
func silentCombinedOutput(name string, arg ...string) ([]byte, error) {
|
||||
return exec.Command(name, arg...).CombinedOutput()
|
||||
}
|
||||
|
||||
func silentOutput(name string, arg ...string) ([]byte, error) {
|
||||
return exec.Command(name, arg...).Output()
|
||||
}
|
||||
|
||||
func silentRun(name string, arg ...string) error {
|
||||
return exec.Command(name, arg...).Run()
|
||||
}
|
||||
|
||||
func silentStart(cmd *exec.Cmd) error {
|
||||
return cmd.Start()
|
||||
}
|
||||
Reference in New Issue
Block a user