disable progressbar in non-terminal
Upstream-commit: f28445254f42fd112aba5f2b67ae6169fae29c2b Component: engine
This commit is contained in:
committed by
Guillaume J. Charmes
parent
03972ad6f7
commit
9bc490e068
@@ -89,6 +89,8 @@ func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error {
|
||||
// <ESC>[2K = erase entire current line
|
||||
fmt.Fprintf(out, "%c[2K\r", 27)
|
||||
endl = "\r"
|
||||
} else if jm.Progress != nil { //disable progressbar in non-terminal
|
||||
return nil
|
||||
}
|
||||
if jm.Time != 0 {
|
||||
fmt.Fprintf(out, "[%s] ", time.Unix(jm.Time, 0))
|
||||
|
||||
Reference in New Issue
Block a user