fix status print
Some checks failed
CloudSave/pipeline/head There was a failure building this commit
Some checks failed
CloudSave/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user