mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-09-05 16:47:22 -04:00
Implement utility function for formatting and printing errors
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
@@ -17,8 +16,7 @@ func LaunchClipClearProcess(copySubject string, isWayland bool) {
|
||||
WriteToStdin(cmd, copySubject)
|
||||
err := cmd.Start()
|
||||
if err != nil {
|
||||
fmt.Println(AnsiError + "Failed to launch automated clipboard clearing process - Does this libmutton implementation support the \"clipclear\" argument?" + AnsiReset)
|
||||
os.Exit(ErrorClipboard)
|
||||
PrintError("Failed to launch automated clipboard clearing process - Does this libmutton implementation support the \"clipclear\" argument?", ErrorClipboard, true)
|
||||
}
|
||||
os.Exit(0) // use os.Exit directly since this version of this function is only meant for non-interactive CLI implementations
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user