fix status print
Some checks failed
CloudSave/pipeline/head There was a failure building this commit

This commit is contained in:
2025-09-13 11:21:42 +02:00
parent 03818e20e5
commit 1239c5ed6b

View File

@@ -59,20 +59,20 @@ func (p *SyncCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{})
fmt.Println()
pg := progressbar.New(-1)
pg.Describe("Warming up...")
done[r.URL] = struct{}{}
syncer := sync.NewSyncer(cli, p.Service)
var pg *progressbar.ProgressBar
destroyPg := func() {
pg.Finish()
pg.Clear()
pg.Close()
}
done[r.URL] = struct{}{}
syncer := sync.NewSyncer(cli, p.Service)
syncer.SetStateCallback(func(s sync.State, g repository.Metadata) {
switch s {
case sync.FetchingMetdata:
pg = progressbar.New(-1)
pg.Describe(fmt.Sprintf("%s: fetching metadata from repository", g.Name))
case sync.Pushing:
pg.Describe(fmt.Sprintf("%s: pushing data to the server", g.Name))