Skip to content

Commit

Permalink
move cmd create position
Browse files Browse the repository at this point in the history
  • Loading branch information
preved911 committed Apr 7, 2020
1 parent 3a0b4ac commit 3369fef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3369fef

Please sign in to comment.