shellcheck, remove old files
[distro-setup] / .git_template / hooks / pre-commit
index f1cb270e6a600e058166c342b0636f095e3d0641..7178d49b6c14aaf34c683661a67cc103bff629e2 100755 (executable)
@@ -65,8 +65,8 @@ if [[ $allownonascii != true ]] &&
        # Note that the use of brackets around a tr range is ok here, (it's
        # even required, for portability to Solaris 10's /usr/bin/tr), since
        # the square bracket bytes happen to fall in the designated range.
-       test $(git diff --cached --name-only --diff-filter=A -z $against |
-                  LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
+       test "$(git diff --cached --name-only --diff-filter=A -z $against |
+                  LC_ALL=C tr -d '[ -~]\0' | wc -c)" != 0
 then
     cat <<EOF
 Error: Attempt to add a non-ASCII file name.