From aec42cad961678401eb64395b14675cc12de4ffd Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Fri, 9 May 2025 14:49:35 +0000 Subject: [PATCH] Remove useless error checks on cmd.Start (missing arguments will not throw an error) --- core/launchClipClearProcessCLIGeneric.go | 5 +---- core/launchClipClearProcessCLIUNIX.go | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/core/launchClipClearProcessCLIGeneric.go b/core/launchClipClearProcessCLIGeneric.go index 5102bac..27bc563 100644 --- a/core/launchClipClearProcessCLIGeneric.go +++ b/core/launchClipClearProcessCLIGeneric.go @@ -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 } diff --git a/core/launchClipClearProcessCLIUNIX.go b/core/launchClipClearProcessCLIUNIX.go index a231abe..3fdfb0a 100644 --- a/core/launchClipClearProcessCLIUNIX.go +++ b/core/launchClipClearProcessCLIUNIX.go @@ -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 }