print clone message to stderr

any non-json output at all seems to break waybar now, so this avoids it.
This commit is contained in:
Harvey Tindall 2020-11-26 19:11:38 +00:00
parent a84ae6bd5b
commit 9b02fc2851
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
2 changed files with 2 additions and 2 deletions

View File

@ -450,8 +450,8 @@ func main() {
}
} else if conn, err := net.Dial("unix", SOCK); err == nil {
// When waybar-mpris is already running, we attach to its output instead of launching a whole new instance.
fmt.Println("waybar-mpris is already running. This instance will clone its output.")
// Print to stderr to avoid errors from waybar
os.Stderr.WriteString("waybar-mpris is already running. This instance will clone its output.")
if err != nil {
log.Fatalln("Couldn't dial:", err)
}

Binary file not shown.