Skip to content

Commit bb883b5

Browse files
fix: suggest install options when linux clipboard helper is missing
1 parent 5150ab5 commit bb883b5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

internal/pal/clipboard_linux.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,9 @@ func copyToClipboard(text string) error {
3939
}
4040

4141
// gotext only scans cmd/modern, cmd/sqlcmd, and pkg/sqlcmd, so this stays plain fmt.Errorf.
42-
return fmt.Errorf("failed to copy to clipboard; tried xclip, xsel, wl-copy: %s", strings.Join(attempts, "; "))
42+
return fmt.Errorf(
43+
"failed to copy to clipboard; tried xclip, xsel, wl-copy: %s. "+
44+
"Install one with your distro's package manager (xclip or xsel on X11, wl-clipboard on Wayland) and use your own judgement on which fits your environment",
45+
strings.Join(attempts, "; "),
46+
)
4347
}

0 commit comments

Comments
 (0)