revert to original conditional format

This commit is contained in:
George Angel 2019-01-03 17:44:51 +00:00
parent 5a2584188f
commit cb8eac2b75
1 changed files with 1 additions and 2 deletions

View File

@ -185,8 +185,7 @@ func main() {
failCount := 0 failCount := 0
for { for {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*time.Duration(*flSyncTimeout)) ctx, cancel := context.WithTimeout(context.Background(), time.Second*time.Duration(*flSyncTimeout))
err := syncRepo(ctx, *flRepo, *flBranch, *flRev, *flDepth, *flRoot, *flDest) if err := syncRepo(ctx, *flRepo, *flBranch, *flRev, *flDepth, *flRoot, *flDest); err != nil {
if err != nil {
if initialSync || failCount >= *flMaxSyncFailures { if initialSync || failCount >= *flMaxSyncFailures {
log.Errorf("error syncing repo: %v", err) log.Errorf("error syncing repo: %v", err)
os.Exit(1) os.Exit(1)