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 }