Selaa lähdekoodia

Add a progress bar to docker pull

Guillaume J. Charmes 12 vuotta sitten
vanhempi
commit
b64dfdd8cd
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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 {