commit 4e8429cc8193f3cfae22d783c663fab714e8e34e
parent 6ad2e077b3b9b6b7176911f7ec36c469bba753fb
Author: Sean Enck <sean@ttypty.com>
Date: Fri, 15 Jul 2022 19:07:23 -0400
fixing use of executable
Diffstat:
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/internal/clip.go b/internal/clip.go
@@ -76,11 +76,7 @@ func CopyToClipboard(value, executable string) {
pipeTo(cp[0], value, true, args...)
if value != "" {
fmt.Printf("clipboard will clear in %d seconds\n", MaxClipTime)
- exe, err := os.Executable()
- if err != nil {
- Die("unable to get executable", err)
- }
- pipeTo(filepath.Join(filepath.Dir(exe), "lb"), value, false, "clear")
+ pipeTo(filepath.Join(filepath.Dir(executable), "lb"), value, false, "clear")
}
}