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
|
return subcommands.ExitFailure
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done := make(map[string]struct{})
|
||||||
for _, r := range rs {
|
for _, r := range rs {
|
||||||
|
if _, ok := done[r.URL]; ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
cli, err := connect(remoteCred, r)
|
cli, err := connect(remoteCred, r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, "error: failed to connect to the remote:", err)
|
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()
|
pg.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done[r.URL] = struct{}{}
|
||||||
syncer := sync.NewSyncer(cli, p.Service)
|
syncer := sync.NewSyncer(cli, p.Service)
|
||||||
|
|
||||||
syncer.SetStateCallback(func(s sync.State, g repository.Metadata) {
|
syncer.SetStateCallback(func(s sync.State, g repository.Metadata) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package constants
|
package constants
|
||||||
|
|
||||||
const Version = "0.0.4e"
|
const Version = "0.0.5"
|
||||||
|
|
||||||
const ApiVersion = 1
|
const ApiVersion = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user