fix: get bar length right
This commit is contained in:
parent
4c66e44b3a
commit
b912e73c5e
|
@ -103,9 +103,16 @@ A new catalogue copy can be published to the recipes repository by passing the
|
|||
|
||||
logrus.Debugf("ensuring '%v' recipe(s) are locally present and up-to-date", len(repos))
|
||||
|
||||
var barLength int
|
||||
if recipeName != "" {
|
||||
barLength = 1
|
||||
} else {
|
||||
barLength = len(repos)
|
||||
}
|
||||
|
||||
cloneLimiter := limit.New(10)
|
||||
retrieveBar := formatter.CreateProgressbar(len(repos), "retrieving recipes from recipes.coopcloud.tech...")
|
||||
ch := make(chan string, len(repos))
|
||||
ch := make(chan string, barLength)
|
||||
for _, repoMeta := range repos {
|
||||
go func(rm catalogue.RepoMeta) {
|
||||
cloneLimiter.Begin()
|
||||
|
@ -151,7 +158,7 @@ A new catalogue copy can be published to the recipes repository by passing the
|
|||
}
|
||||
|
||||
catl := make(catalogue.RecipeCatalogue)
|
||||
catlBar := formatter.CreateProgressbar(len(repos), "generating catalogue...")
|
||||
catlBar := formatter.CreateProgressbar(barLength, "generating catalogue metadata...")
|
||||
for _, recipeMeta := range repos {
|
||||
if recipeName != "" && recipeName != recipeMeta.Name {
|
||||
catlBar.Add(1)
|
||||
|
|
Loading…
Reference in New Issue