Skip to content

Commit 2f04b3b

Browse files
committed
fix: quote chpwd_functions array expansion for ShellCheck SC2206
1 parent 767e968 commit 2f04b3b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

phpvm.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3047,7 +3047,8 @@ if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
30473047
elif [ -n "${ZSH_VERSION:-}" ]; then
30483048
# Zsh: add to chpwd_functions array
30493049
if [[ ! " ${chpwd_functions[*]:-} " =~ " phpvm_cd_hook " ]]; then
3050-
chpwd_functions=(phpvm_cd_hook ${chpwd_functions[@]:-})
3050+
# shellcheck disable=SC2206 # Intentional: chpwd_functions is a zsh array, word splitting is safe here
3051+
chpwd_functions=(phpvm_cd_hook "${chpwd_functions[@]:-}")
30513052
fi
30523053
fi
30533054
fi

0 commit comments

Comments
 (0)