From b707d6711397ff40480c4db9a00e15a57866b15e Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 27 Dec 2025 00:25:53 -0500 Subject: [PATCH] Fix compilation for Mac/Termux/Windows --- clip/copy_MAC.go | 4 ++-- clip/copy_TERMUX.go | 4 ++-- clip/copy_WIN.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clip/copy_MAC.go b/clip/copy_MAC.go index 47ee3be..13ce238 100644 --- a/clip/copy_MAC.go +++ b/clip/copy_MAC.go @@ -24,8 +24,8 @@ func CopyString(clearClipboardAutomatically bool, copySubject string) error { } // getClipCommands returns the commands for pasting and clearing the clipboard contents. -func getClipCommands() (*exec.Cmd, *exec.Cmd) { +func getClipCommands() (*exec.Cmd, *exec.Cmd, error) { cmdClear := exec.Command("pbcopy") _ = back.WriteToStdin(cmdClear, "") - return exec.Command("pbpaste"), cmdClear + return exec.Command("pbpaste"), cmdClear, nil } diff --git a/clip/copy_TERMUX.go b/clip/copy_TERMUX.go index 9a60f37..b7fc2bf 100644 --- a/clip/copy_TERMUX.go +++ b/clip/copy_TERMUX.go @@ -24,8 +24,8 @@ func CopyString(clearClipboardAutomatically bool, copySubject string) error { } // getClipCommands returns the commands for pasting and clearing the clipboard contents. -func getClipCommands() (*exec.Cmd, *exec.Cmd) { +func getClipCommands() (*exec.Cmd, *exec.Cmd, error) { cmdClear := exec.Command("termux-clipboard-set") _ = back.WriteToStdin(cmdClear, "") - return exec.Command("termux-clipboard-get"), cmdClear + return exec.Command("termux-clipboard-get"), cmdClear, nil } diff --git a/clip/copy_WIN.go b/clip/copy_WIN.go index 995bc7f..83a865b 100644 --- a/clip/copy_WIN.go +++ b/clip/copy_WIN.go @@ -23,6 +23,6 @@ func CopyString(clearClipboardAutomatically bool, copySubject string) error { } // getClipCommands returns the commands for pasting and clearing the clipboard contents. -func getClipCommands() (*exec.Cmd, *exec.Cmd) { - return exec.Command("powershell.exe", "-c", "Get-Clipboard"), exec.Command("powershell.exe", "-c", "Set-Clipboard") +func getClipCommands() (*exec.Cmd, *exec.Cmd, error) { + return exec.Command("powershell.exe", "-c", "Get-Clipboard"), exec.Command("powershell.exe", "-c", "Set-Clipboard"), nil }