Add check for restic before running
continuous-integration/drone/push Build is failing Details

Fixes #2
This commit is contained in:
IamTheFij 2022-11-04 14:37:32 -07:00
parent 3103fbde29
commit 0f78f237f0
1 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import (
"fmt"
"log"
"os"
"os/exec"
"strings"
"github.com/hashicorp/hcl/v2"
@ -169,6 +170,10 @@ func main() {
return
}
if _, err := exec.LookPath("restic"); err != nil {
log.Fatalf("Could not find restic in path. Make sure it's installed")
}
if flag.NArg() == 0 {
log.Fatalf("Requires a path to a job file, but found none")
}