зеркало из https://github.com/microsoft/docker.git
fix errors
This commit is contained in:
Родитель
f1dd299227
Коммит
01e98bf0dd
|
@ -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" {
|
if resp.Header.Get("Content-Type") == "application/json" {
|
||||||
utils.DisplayJSONMessagesStream(resp.Body, out)
|
return utils.DisplayJSONMessagesStream(resp.Body, out)
|
||||||
} else {
|
} else {
|
||||||
if _, err := io.Copy(out, resp.Body); err != nil {
|
if _, err := io.Copy(out, resp.Body); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -658,12 +658,14 @@ func DisplayJSONMessagesStream(in io.Reader, out io.Writer) error {
|
||||||
}
|
}
|
||||||
fmt.Fprintf(out, "%c[%dA", 27, diff)
|
fmt.Fprintf(out, "%c[%dA", 27, diff)
|
||||||
}
|
}
|
||||||
jm.Display(out)
|
err := jm.Display(out)
|
||||||
if jm.ID != "" {
|
if jm.ID != "" {
|
||||||
fmt.Fprintf(out, "%c[%dB", 27, diff)
|
fmt.Fprintf(out, "%c[%dB", 27, diff)
|
||||||
}
|
}
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// fmt.Fprintf(out, "\n")
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче