mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-31 14:26:36 -04:00
Fix building for many non-Linux platforms
This commit is contained in:
+3
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user