From 77fe3611758abc86e87050a556ca6f73299cdc2f Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 16 Jul 2018 10:53:46 -0700 Subject: [PATCH] Strip escape characters when TERM=dumb Bug: 111447427 Test: m nothing Test: TERM=dumb m nothing Test: m nothing | tee log Change-Id: I041ec8a60e633393a145996d9ba7b5dae2880b06 --- ui/terminal/writer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/terminal/writer.go b/ui/terminal/writer.go index 351c00c11..ebe4b2aad 100644 --- a/ui/terminal/writer.go +++ b/ui/terminal/writer.go @@ -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 }