Commit Graph

5 Commits

Author SHA1 Message Date
Phil Estes
b1527e0a10
Handle progress line length properly for formatting
Two issues with a prior PR for handling line-spanning progress bars are
fixed in this PR:
 - corner case where output line len == term width: extra line was being
 added
 - line length calculation was including escape characters causing
 calculations to span lines when output was still only on one line

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-11-09 15:58:51 -05:00
Zhang Wei
a06abd7493 [progress] Fix wrong display of progress bar
When we try to pull an image with "ctr pull xxx", the progress bar
display will flush all the screen and make it so hard to find useful
information for user.

This commit fixes bugs for the progress bar, by correcting "line counting"
algorithm. Previous algorithm only counts number of "\n", but one line
can be longer than screen width, in which case it should be counted as
two lines. Also updated the screen cleaning ESC chars.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2017-10-17 00:24:54 +08:00
Michael Crosby
451421b615 Comment more packages to pass go lint
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-02 13:54:56 -04:00
Kenfe-Mickael Laventure
829845d268
Fix ineffassign warnings
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-03 08:27:15 -07:00
Stephen J Day
55a1b4eff8 cmd/dist: implement fetch prototype
With the rename of fetch to fetch-object, we now introduce the `fetch`
command. It will fetch all of the resources required for an image into
the content store. We'll still need to follow this up with metadata
registration but this is a good start.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-03-02 17:36:01 -08:00