From cb8eac2b75593fddeef8506e7a8565dbdc911c80 Mon Sep 17 00:00:00 2001 From: George Angel Date: Thu, 3 Jan 2019 17:44:51 +0000 Subject: [PATCH] revert to original conditional format --- cmd/git-sync/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/git-sync/main.go b/cmd/git-sync/main.go index afaa0fb..bdf433a 100644 --- a/cmd/git-sync/main.go +++ b/cmd/git-sync/main.go @@ -185,8 +185,7 @@ func main() { failCount := 0 for { ctx, cancel := context.WithTimeout(context.Background(), time.Second*time.Duration(*flSyncTimeout)) - err := syncRepo(ctx, *flRepo, *flBranch, *flRev, *flDepth, *flRoot, *flDest) - if err != nil { + if err := syncRepo(ctx, *flRepo, *flBranch, *flRev, *flDepth, *flRoot, *flDest); err != nil { if initialSync || failCount >= *flMaxSyncFailures { log.Errorf("error syncing repo: %v", err) os.Exit(1)