Skip to content

Commit

Permalink
Ensure Packer configuration dependencies are installed
Browse files Browse the repository at this point in the history
Run a `packer init .` to ensure that a configuration's requirements are
installed before attempting to validate the configuration.
  • Loading branch information
mcdonnnj committed Oct 4, 2024
1 parent 82c15ee commit 8621258
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hooks/packer_validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ error=0

for path in "${UNIQUE_PATHS[@]}"; do
pushd "$path" > /dev/null

packer init . > /dev/null
if ! packer validate "${ARGS[@]}" .; then
error=1
echo
Expand Down

0 comments on commit 8621258

Please sign in to comment.