Skip to content

Commit

Permalink
Stop execution if more than one flag specified
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxymVlasov authored Nov 25, 2022
1 parent b52b475 commit 4464e13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hooks/terraform_validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ function per_dir_hook_unique_part {

case $key in
--retry-once-with-cleanup)
if [ $retry_once_with_cleanup ]; then
common::colorify "yellow" 'Invalid hook config. Make sure that you specify not more than one "--retry-once-with-cleanup" flag'
exit 1
fi
retry_once_with_cleanup=$value
;;
esac
Expand Down

0 comments on commit 4464e13

Please sign in to comment.