ctr: dismiss progressbar on --debug

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2017-08-03 09:32:07 +00:00
parent 0fa76584f8
commit b45fb98530

View File

@ -69,7 +69,10 @@ func fetch(ctx context.Context, ref string, clicontext *cli.Context) (containerd
progress := make(chan struct{}) progress := make(chan struct{})
go func() { go func() {
showProgress(pctx, ongoing, client.ContentStore(), os.Stdout) if !clicontext.GlobalBool("debug") {
// no progress bar, because it hides some debug logs
showProgress(pctx, ongoing, client.ContentStore(), os.Stdout)
}
close(progress) close(progress)
}() }()