From e598791d7ffdbb4bbf47f19cd5f9109f1ff013e6 Mon Sep 17 00:00:00 2001 From: Evan Wies Date: Mon, 4 May 2026 19:40:25 -0400 Subject: [PATCH] fix(gocopy): handle timeout clipboard clear errors Signed-off-by: Evan Wies --- cmd/gocopy/gocopy.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/gocopy/gocopy.go b/cmd/gocopy/gocopy.go index 5148f10..5301f95 100644 --- a/cmd/gocopy/gocopy.go +++ b/cmd/gocopy/gocopy.go @@ -29,10 +29,9 @@ func main() { os.Exit(1) } if text == string(out) { - err = clipboard.WriteAll("") + if err := clipboard.WriteAll(""); err != nil { + os.Exit(1) + } } } - if err != nil { - os.Exit(1) - } }