Fix build failures on several platforms

This commit is contained in:
2025-01-16 15:49:57 -05:00
parent 81b78068a7
commit c71cacb507
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import (
// copyString copies a string to the clipboard.
func copyString(continuous bool, copySubject string) {
cmd := exec.Command("pbcopy")
writeToStdin(cmd, copySubject)
WriteToStdin(cmd, copySubject)
err := cmd.Run()
if err != nil {
fmt.Println(AnsiError+"Failed to copy to clipboard:", err.Error()+AnsiReset)
@@ -26,6 +26,6 @@ func copyString(continuous bool, copySubject string) {
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
func getClipCommands() (*exec.Cmd, *exec.Cmd) {
cmdClear := exec.Command("pbcopy")
writeToStdin(cmdClear, "")
WriteToStdin(cmdClear, "")
return exec.Command("pbpaste"), cmdClear
}
+2 -2
View File
@@ -11,7 +11,7 @@ import (
// copyString copies a string to the clipboard.
func copyString(continuous bool, copySubject string) {
cmd := exec.Command("termux-clipboard-set")
writeToStdin(cmd, copySubject)
WriteToStdin(cmd, copySubject)
err := cmd.Run()
if err != nil {
fmt.Println(AnsiError+"Failed to copy to clipboard:", err.Error()+AnsiReset)
@@ -26,6 +26,6 @@ func copyString(continuous bool, copySubject string) {
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
func getClipCommands() (*exec.Cmd, *exec.Cmd) {
cmdClear := exec.Command("termux-clipboard-set")
writeToStdin(cmdClear, "")
WriteToStdin(cmdClear, "")
return exec.Command("termux-clipboard-get"), cmdClear
}
+1 -1
View File
@@ -13,7 +13,7 @@ import (
func LaunchClipClearProcess(copySubject string) {
executableName := os.Args[0]
cmd := exec.Command(executableName, "clipclear")
writeToStdin(cmd, copySubject)
WriteToStdin(cmd, copySubject)
err := cmd.Start()
if err != nil {
fmt.Println(AnsiError + "Failed to launch automated clipboard clearing process - Does this libmutton implementation support the \"clipclear\" argument?" + AnsiReset)
+1 -1
View File
@@ -6,5 +6,5 @@ package core
// For interactive GUI/TUI implementations, the clipboard clearing process is launched as a goroutine.
// copySubject can be omitted to clear the clipboard immediately and unconditionally.
func LaunchClipClearProcess(copySubject string) {
go ClipClearProcess(copySubject)
go clipClearProcess(copySubject)
}