Fix building for many non-Linux platforms

This commit is contained in:
2025-05-11 00:41:44 -04:00
parent 491392562a
commit dfb5c10dcb
7 changed files with 26 additions and 14 deletions
+3 -1
View File
@@ -5,13 +5,15 @@ package core
import (
"os"
"os/exec"
"github.com/rwinkhart/go-boilerplate/back"
)
// LaunchClipClearProcess launches the timed clipboard clearing process.
// For non-interactive CLI implementations, an entirely separate process is created for this purpose.
func LaunchClipClearProcess(copySubject string) {
cmd := exec.Command(os.Args[0], "clipclear")
writeToStdin(cmd, copySubject)
back.WriteToStdin(cmd, copySubject)
cmd.Start()
os.Exit(0) // use os.Exit directly since this version of this function is only meant for non-interactive CLI implementations
}