From c50ea6f0a387357944e208c7af62f8da717d43a9 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 31 May 2018 23:56:20 -0700 Subject: [PATCH] [shellcheck] quote variables in for loops to avoid unintentional expansion --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 96873fa..5d488fe 100644 --- a/nvm.sh +++ b/nvm.sh @@ -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