summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel Bridges <bridges2@gmail.com>2019-07-19 22:49:57 -0700
committerDrew DeVault <sir@cmpwn.com>2019-07-23 10:41:13 -0400
commitec0e0f9d751f8b387a7b10b65b0a6ab35d50c59b (patch)
treeb304d69e43624bfdf202078aacc098ce1d85eee0
parente42b95a617399b2736df96ae6469309e6b306d71 (diff)
downloadaerc-ec0e0f9d751f8b387a7b10b65b0a6ab35d50c59b.tar.gz
Discard stdout if not redirected to file
Commit 97bee661 Printf statement at widgets/msgviewer.go#188 introduced
bad formatting in the display if stdout was not being redirected.
-rw-r--r--aerc.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/aerc.go b/aerc.go
index 1b313c3..ca131e6 100644
--- a/aerc.go
+++ b/aerc.go
@@ -128,6 +128,7 @@ func main() {
 		logOut = os.Stdout
 	} else {
 		logOut = ioutil.Discard
+		os.Stdout, _ = os.Open(os.DevNull)
 	}
 	logger = log.New(logOut, "", log.LstdFlags)
 	logger.Println("Starting up aerc")