From 121cce7e515f9eca8d8708a262a7cc262ee9b7e9 Mon Sep 17 00:00:00 2001 From: antiochp <30642645+antiochp@users.noreply.github.com> Date: Wed, 20 Dec 2017 15:37:23 -0500 Subject: [PATCH] fix the bash array loop --- .hooks/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.hooks/pre-commit b/.hooks/pre-commit index f3f6edfe..e11a0241 100755 --- a/.hooks/pre-commit +++ b/.hooks/pre-commit @@ -38,7 +38,7 @@ if [ $result != 0 ]; then printf "\033[0;31mfail\033[0m \n" printf "[pre_commit] the following files need formatting: \n" - for file in $problem_files; do + for file in ${problem_files[@]}; do printf " cargo +nightly fmt -- $file\n" done else