浏览代码

Add newlines to FormatProgress for JSON as well

Commit 060da572d20dfeee4fe02ce6b975a6cb33e50dbe has introduced newlines
to streamformatter to help parse Remote API responses. However,
FormatProgress method was omitted from the list of patched methods,
leaving progress messages in, say, /images/create without newlines.

Signed-off-by: Roma Sokolov <sokolov.r.v@gmail.com>
Roma Sokolov 9 年之前
父节点
当前提交
e98b8e0857
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/streamformatter/streamformatter.go

+ 1 - 1
pkg/streamformatter/streamformatter.go

@@ -83,7 +83,7 @@ func (sf *StreamFormatter) FormatProgress(id, action string, progress *jsonmessa
 		if err != nil {
 			return nil
 		}
-		return b
+		return append(b, streamNewlineBytes...)
 	}
 	endl := "\r"
 	if progress.String() == "" {