Skip to content

Commit

Permalink
Allow one-symbol ENVs
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxymVlasov committed Mar 12, 2024
1 parent 3418a67 commit e76ffce
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-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 e76ffce

Please sign in to comment.