This commit is contained in:
Victor Vieux 2013-07-25 14:32:46 +00:00
Родитель f1dd299227
Коммит 01e98bf0dd
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -1536,7 +1536,7 @@ func (cli *DockerCli) stream(method, path string, in io.Reader, out io.Writer) e
}
if resp.Header.Get("Content-Type") == "application/json" {
utils.DisplayJSONMessagesStream(resp.Body, out)
return utils.DisplayJSONMessagesStream(resp.Body, out)
} else {
if _, err := io.Copy(out, resp.Body); err != nil {
return err

Просмотреть файл

@ -658,12 +658,14 @@ func DisplayJSONMessagesStream(in io.Reader, out io.Writer) error {
}
fmt.Fprintf(out, "%c[%dA", 27, diff)
}
jm.Display(out)
err := jm.Display(out)
if jm.ID != "" {
fmt.Fprintf(out, "%c[%dB", 27, diff)
}
if err != nil {
return err
}
}
// fmt.Fprintf(out, "\n")
return nil
}