Add check for restic before running
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Fixes #2
This commit is contained in:
parent
3103fbde29
commit
0f78f237f0
5
main.go
5
main.go
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user