Remove useless error checks on cmd.Start (missing arguments will not throw an error)

This commit is contained in:
2025-05-09 14:49:35 +00:00
parent 0d66c26878
commit aec42cad96
2 changed files with 2 additions and 8 deletions
+1 -4
View File
@@ -12,9 +12,6 @@ import (
func LaunchClipClearProcess(copySubject string) {
cmd := exec.Command(os.Args[0], "clipclear")
writeToStdin(cmd, copySubject)
err := cmd.Start()
if err != nil {
PrintError("Failed to launch automated clipboard clearing process - Does this libmutton implementation support the \"clipclear\" argument?", ErrorClipboard, true)
}
cmd.Start()
os.Exit(0) // use os.Exit directly since this version of this function is only meant for non-interactive CLI implementations
}
+1 -4
View File
@@ -13,9 +13,6 @@ import (
func LaunchClipClearProcess(copySubject string, isWayland bool) {
cmd := exec.Command(os.Args[0], "clipclear", strconv.FormatBool(isWayland))
writeToStdin(cmd, copySubject)
err := cmd.Start()
if err != nil {
PrintError("Failed to launch automated clipboard clearing process - Does this libmutton implementation support the \"clipclear\" argument?", ErrorClipboard, true)
}
cmd.Start()
os.Exit(0) // use os.Exit directly since this version of this function is only meant for non-interactive CLI implementations
}