Skip to content

Commit

Permalink
Add some debugging output to the hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonnnj committed Dec 14, 2024
1 parent c25c0bf commit 5568903
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hooks/packer_fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ util::parse_cmdline "$@"

error=0

echo "Processing files in packer_fmt" >> pre-commit-packer.log
for file in "${FILES[@]}"; do
echo "$file" >> pre-commit-packer.log

if ! packer fmt "${ARGS[@]}" -- "$file"; then
error=1
echo
Expand Down
3 changes: 3 additions & 0 deletions hooks/packer_validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ util::get_unique_directory_paths "${FILES[@]}"

error=0

echo "Processing paths in packer_validate" >> pre-commit-packer.log
for path in "${UNIQUE_PATHS[@]}"; do
echo "$path" >> pre-commit-packer.log

pushd "$path" > /dev/null

packer init . > /dev/null
Expand Down

0 comments on commit 5568903

Please sign in to comment.