Browse code

fix display on test

Victor Vieux authored on 2013/11/29 07:40:17
Showing 1 changed files
... ...
@@ -60,7 +60,11 @@ func (sf *StreamFormatter) FormatProgress(id, action string, progress *JSONProgr
60 60
 		}
61 61
 		return b
62 62
 	}
63
-	return []byte(action + " " + progress.String() + "\r")
63
+	endl := "\r"
64
+	if progress.String() == "" {
65
+		endl += "\n"
66
+	}
67
+	return []byte(action + " " + progress.String() + endl)
64 68
 }
65 69
 
66 70
 func (sf *StreamFormatter) Used() bool {