fix loop sync cli
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:
@@ -45,7 +45,12 @@ func (p *SyncCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{})
|
||||
return subcommands.ExitFailure
|
||||
}
|
||||
|
||||
done := make(map[string]struct{})
|
||||
for _, r := range rs {
|
||||
if _, ok := done[r.URL]; ok {
|
||||
continue
|
||||
}
|
||||
|
||||
cli, err := connect(remoteCred, r)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, "error: failed to connect to the remote:", err)
|
||||
@@ -62,6 +67,7 @@ func (p *SyncCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{})
|
||||
pg.Close()
|
||||
}
|
||||
|
||||
done[r.URL] = struct{}{}
|
||||
syncer := sync.NewSyncer(cli, p.Service)
|
||||
|
||||
syncer.SetStateCallback(func(s sync.State, g repository.Metadata) {
|
||||
|
||||
Reference in New Issue
Block a user