Fix compilation for Mac/Termux/Windows

This commit is contained in:
RandyTheSilly committed 2025-12-27 00:25:53 -05:00
1 parent d8d761b0ca
commit b707d67113
3 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -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
}
+2 -2
View File
@@ -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
}
+2 -2
View File
@@ -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
}