Fix building for many non-Linux platforms

This commit is contained in:
2025-05-11 00:41:44 -04:00
parent 491392562a
commit dfb5c10dcb
7 changed files with 26 additions and 14 deletions
+3 -1
View File
@@ -6,6 +6,8 @@ import (
"fmt"
"os/exec"
"strings"
"github.com/rwinkhart/go-boilerplate/back"
)
// copyString copies a string to the clipboard.
@@ -13,7 +15,7 @@ func copyString(continuous bool, copySubject string) {
cmd := exec.Command("powershell.exe", "-c", fmt.Sprintf("echo '%s' | Set-Clipboard", strings.ReplaceAll(copySubject, "'", "''")))
err := cmd.Run()
if err != nil {
PrintError("Failed to copy to clipboard: "+err.Error(), ErrorClipboard, true)
back.PrintError("Failed to copy to clipboard: "+err.Error(), ErrorClipboard, true)
}
if !continuous {