Skip to content

Commit

Permalink
add config file existence check and improve ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuchard committed Dec 5, 2024
1 parent 4c501ee commit f29a7a1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- checkout
- run:
name: install prereqs
command: apk add --no-cache --update build-base
command: apk add --no-cache --update make
- run:
name: build
command: make build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: checkout
uses: actions/checkout@v4
- name: install prereqs
run: apk add --no-cache --update build-base
run: apk add --no-cache --update make
- name: build
run: make build
- name: bootstrap vault server
Expand Down
7 changes: 7 additions & 0 deletions util/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ func Cli() *string {
os.Exit(0)
}

// verify config file existence
if len(*hclConfigPath) > 0 {
if _, err := os.Stat(*hclConfigPath); err != nil {
log.Fatalf("the config file at %s does not exist", *hclConfigPath)
}
}

// return path to hcl config file
return hclConfigPath
}

0 comments on commit f29a7a1

Please sign in to comment.