fix(selector): ignore selector's stderr

Gtk errors from wofi were polluting our selection
This commit is contained in:
yory8 2019-09-30 19:09:15 +02:00
parent a080e1b7f9
commit d3c5a2c158

View file

@ -47,7 +47,8 @@ func selector(data []string, max int, tool string) (string, error) {
processed, guide := preprocessData(data, true, false)
cmd := exec.Cmd{Path: bin, Args: args, Stdin: strings.NewReader(strings.Join(processed, "\n"))}
b, err := cmd.CombinedOutput()
b, err := cmd.Output()
// note: ignore stderr, necessary e.g. for wofi's gtk errors
if err != nil {
if err.Error() == "exit status 1" {
// dmenu/rofi exits with this error when no selection done