Skip to content

Commit

Permalink
repository/progress: Format progress (#1312)
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden authored Apr 15, 2021
1 parent 3a1296b commit 2036470
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/repository/clone_mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func download(targetDir, tmpDir string, repo *V1Repository, item *v1manifest.Ver
// Skip installed file if exists file valid
if utils.IsExist(dstFile) {
if err := validate(targetDir); err == nil {
fmt.Println("Skip exists file:", filepath.Join(targetDir, item.URL))
fmt.Println("Skipping existing file:", filepath.Join(targetDir, item.URL))
return nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/repository/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (p *ProgressBar) Start(url string, size int64) {
p.size = size
p.bar = pb.Start64(size)
p.bar.Set(pb.Bytes, true)
p.bar.SetTemplateString(fmt.Sprintf(`download %s {{counters . }} {{percent . }} {{speed . }}`, url))
p.bar.SetTemplateString(fmt.Sprintf(`download %s {{counters . }} {{percent . }} {{speed . "%%s/s" "? MiB/s"}}`, url))
}

// SetCurrent implement the DownloadProgress interface
Expand Down

0 comments on commit 2036470

Please sign in to comment.