Skip to content

Commit

Permalink
feat: Expand environment variables in --args= which contains lowerc…
Browse files Browse the repository at this point in the history
…ase symbols, like `${TF_VAR_lowercase}` (antonbabenko#719)
  • Loading branch information
MaxymVlasov authored Sep 16, 2024
1 parent a8ed894 commit bf156b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function common::parse_and_export_env_vars {
while true; do
# Check if at least 1 env var exists in `$arg`
# shellcheck disable=SC2016 # '${' should not be expanded
if [[ "$arg" =~ '${'[A-Z_][A-Z0-9_]*'}' ]]; then
if [[ "$arg" =~ '${'[A-Z_][A-Za-z0-9_]*'}' ]]; then
# Get `ENV_VAR` from `.*${ENV_VAR}.*`
local env_var_name=${arg#*$\{}
env_var_name=${env_var_name%%\}*}
Expand Down

0 comments on commit bf156b4

Please sign in to comment.