Skip to content

Commit

Permalink
Fix files pattern for packer_validate
Browse files Browse the repository at this point in the history
As it was given it would only match `packer.json` in the root directory. Since
this is not desired behavior, the pattern has to be loosened to match any path
ending in `packer.json` instead.
  • Loading branch information
mcdonnnj committed Dec 19, 2020
1 parent 7d45242 commit 81506c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
description: This hook runs `packer validate` on appropriate files.
entry: hooks/packer_validate.sh
language: script
files: ^(packer\.json|.*\.pkr\.hcl)$
files: (packer\.json|\.pkr\.hcl)$
pass_filenames: true
always_run: true

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ repos:
## Notes about the `packer_validate` hook ##

This hook matches `packer.json` and any file ending in `.pkr.hcl` by default.
Files can be added for checking manually as additional arguments.
This hook matches any paths ending in `packer.json` and `.pkr.hcl` by default.
File paths can be added for checking manually as additional arguments.

## Contributing ##

Expand Down

0 comments on commit 81506c6

Please sign in to comment.