[shellcheck] quote variables in for loops to avoid unintentional expansion

Jordan Harband 2018-05-31 23:56:20 -07:00
parent 628d4fac84
commit c50ea6f0a3
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
1 changed files with 1 additions and 1 deletions

2
nvm.sh
View File

@ -2316,7 +2316,7 @@ nvm_check_file_permissions() {
ZSH_HAS_NONOMATCH_UNSET="$(set +e ; setopt | nvm_grep -q nonomatch ; nvm_echo $?)"
setopt nonomatch
fi
for FILE in $1/* $1/.[!.]* $1/..?* ; do
for FILE in "$1"/* "$1"/.[!.]* "$1"/..?* ; do
if [ -d "$FILE" ]; then
if ! nvm_check_file_permissions "$FILE"; then
if [ "${ZSH_HAS_NONOMATCH_UNSET}" -eq 1 ] && nvm_has "setopt"; then