Skip to content

Commit

Permalink
Merge pull request #15482 from spowelljr/fixProgressBars
Browse files Browse the repository at this point in the history
Remove progress bar for kic download when JSON output
  • Loading branch information
spowelljr authored Jan 11, 2023
2 parents afee4e7 + 6b96d92 commit 22db818
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/minikube/download/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"k8s.io/minikube/pkg/minikube/detect"
"k8s.io/minikube/pkg/minikube/image"
"k8s.io/minikube/pkg/minikube/localpath"
"k8s.io/minikube/pkg/minikube/out"
)

var (
Expand Down Expand Up @@ -138,6 +139,12 @@ func ImageToCache(img string) error {
return errors.Wrap(err, "getting remote image")
}
klog.V(3).Infof("Writing image %v", tag)
if out.JSON {
if err := tarball.WriteToFile(f, tag, i); err != nil {
return errors.Wrap(err, "writing tarball image")
}
return nil
}
errchan := make(chan error)
p := pb.Full.Start64(0)
fn := image.Tag(ref.Name())
Expand Down

0 comments on commit 22db818

Please sign in to comment.