From eea6c00cce83909fd70b682d11e8c5ef78b484b4 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Mon, 4 Jul 2022 18:35:30 +0300 Subject: [PATCH] Add ability to specify `--hook-config` in future --- hooks/terraform_validate.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 122eb69f2..78a0da8f8 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -36,6 +36,7 @@ function main { # global variables with appropriate values # Globals (init and populate): # ARGS (array) arguments that configure wrapped tool behavior +# HOOK_CONFIG (array) arguments that configure hook behavior # INIT_ARGS (array) arguments to `terraform init` command # ENVS (array) environment variables that will be used with # `terraform` commands @@ -56,6 +57,11 @@ function parse_cmdline_ { ARGS+=("$1") shift ;; + -h | --hook-config) + shift + HOOK_CONFIG+=("$1;") + shift + ;; -i | --init-args) shift INIT_ARGS+=("$1")