Skip to content

Commit c819079

Browse files
committed
Output status -time-only without escape sequences
1 parent a846b7f commit c819079

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

command/status.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package command
66

77
import (
88
"flag"
9+
"fmt"
910
"strings"
1011
"time"
1112

@@ -117,7 +118,12 @@ func (c StatusCmd) Run(args []string) int {
117118
out += o
118119
}
119120

120-
c.Ui.Output(out)
121+
if totalOnly {
122+
// plain output, no ansi escape sequences
123+
fmt.Print(out)
124+
} else {
125+
c.Ui.Output(out)
126+
}
121127
return 0
122128
}
123129

0 commit comments

Comments
 (0)