Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77fe3611 authored by Dan Willemsen's avatar Dan Willemsen
Browse files

Strip escape characters when TERM=dumb

Bug: 111447427
Test: m nothing
Test: TERM=dumb m nothing
Test: m nothing | tee log
Change-Id: I041ec8a60e633393a145996d9ba7b5dae2880b06
parent dd41d7d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,8 +82,8 @@ func NewWriter(stdio StdioInterface) Writer {

	if term, ok := os.LookupEnv("TERM"); ok && term != "dumb" {
		w.smartTerminal = isTerminal(stdio.Stdout())
		w.stripEscapes = !w.smartTerminal
	}
	w.stripEscapes = !w.smartTerminal

	return w
}