瀏覽代碼

Add a progress bar to docker pull

Guillaume J. Charmes 12 年之前
父節點
當前提交
b64dfdd8cd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      registry.go

+ 1 - 1
registry.go

@@ -135,7 +135,7 @@ func (graph *Graph) getRemoteImage(stdout io.Writer, imgId string, authConfig *a
 	if err != nil {
 		return nil, nil, err
 	}
-	return img, res.Body, nil
+	return img, ProgressReader(res.Body, int(res.ContentLength), stdout), nil
 }
 
 func (graph *Graph) PullImage(stdout io.Writer, imgId string, authConfig *auth.AuthConfig) error {