fix: explicitely serve TEXT

Fix #35
This commit is contained in:
yory8 2020-02-19 13:54:35 +01:00
parent 883c4aa209
commit b0ee84e87e
2 changed files with 6 additions and 1 deletions

View file

@ -9,6 +9,10 @@
- add support for bemenu selector, a multi backend dmenu clone
- add a man page
**Notable Bug fixes**
- some input were skipped because not recognized as text
# 1.2.0
**New features**

View file

@ -169,7 +169,8 @@ func serveTxt(s string) {
log.Printf("couldn't find wl-copy: %v\n", err)
}
cmd := exec.Cmd{Path: bin, Stdin: strings.NewReader(s)}
// we mandate the mime type because we know we can only serve text; not doing this leads to weird bugs like #35
cmd := exec.Cmd{Path: bin, Args: []string{bin, "-t", "TEXT"}, Stdin: strings.NewReader(s)}
if err := cmd.Run(); err != nil {
log.Printf("error running wl-copy: %s\n", err)
}