From 3369fef8b8d98d3e6bdeefa547d3a4c240fb82ee Mon Sep 17 00:00:00 2001 From: Ildar Valiullin Date: Tue, 7 Apr 2020 10:16:54 +0300 Subject: [PATCH] move cmd create position --- main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.go b/main.go index a3d3dd5..390c3da 100644 --- a/main.go +++ b/main.go @@ -44,10 +44,9 @@ func resticCheck() { "RESTIC_REPOSITORY", fmt.Sprintf("%s/%s", os.Getenv("RESTIC_REPOSITORY_BUCKET"), prefix)) - cmd := exec.Command(resticExecPath, "check") - // 5 attempts before failed state return for i := 0; i < 5; i++ { + cmd := exec.Command(resticExecPath, "check") err := cmd.Run() if err != nil { log.Printf("check failed: %s\n", err)