aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarvey Tindall <hrfee@protonmail.ch>2021-05-21 16:03:33 +0100
committerHarvey Tindall <hrfee@protonmail.ch>2021-05-21 16:03:33 +0100
commitfe851278f4e08c8c7bda8344f0a9790a35487554 (patch)
tree7efd97edef4f836ee4e1033c5248003b3d9e2f76
parent49b3212c48194608edc4adef32f7fdaca47fd05e (diff)
downloadwaybar-mpris-fe851278f4e08c8c7bda8344f0a9790a35487554.tar.gz
waybar-mpris-fe851278f4e08c8c7bda8344f0a9790a35487554.zip
change order of writers in io.Multiwriter
io.MultiWriter (i think) thinks dataWrite.Write fails, and so doesn't continue writing to all other outputs. This just makes it the last one, should fix #4.
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 08f58c7..6fa3844 100644
--- a/main.go
+++ b/main.go
@@ -484,9 +484,9 @@ func listenForCommands(players *players) {
players,
}
if isSharing {
- WRITER = io.MultiWriter(SHAREWRITER, DATAWRITER, os.Stdout)
+ WRITER = io.MultiWriter(os.Stdout, SHAREWRITER, DATAWRITER)
} else {
- WRITER = io.MultiWriter(DATAWRITER, os.Stdout)
+ WRITER = io.MultiWriter(os.Stdout, DATAWRITER)
}
isDataSharing = true
}