Browse Source

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

Jordan Harband 7 years ago
parent
commit
c50ea6f0a3
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
  1. 2
      nvm.sh

2
nvm.sh

@ -2316,7 +2316,7 @@ nvm_check_file_permissions() { @@ -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

Loading…
Cancel
Save