stylecheck script: improve bash consition because of error iwth newer terminal versionsstylecheck script: improve bash condition to avoid error with newer terminal versions (#25193)

This commit is contained in:
Matthias Grob
2025-07-10 20:59:19 +02:00
committed by GitHub
parent 79f6b84190
commit 140b426720
+1 -1
View File
@@ -43,7 +43,7 @@ fi
# install git pre-commit hook
HOOK_FILE="$DIR/../../.git/hooks/pre-commit"
if [ ! -f $HOOK_FILE ] && [ "$CI" != "true" ] && [ $- == *i* ]; then
if [[ ! -f "$HOOK_FILE" && "$CI" != "true" && $- == *i* ]]; then
echo ""
echo -e "\033[31mNinja tip: add a git pre-commit hook to automatically check code style\033[0m"
echo -e "Would you like to install one now? (\033[94mcp ./Tools/astyle/pre-commit .git/hooks/pre-commit\033[0m): [y/\033[1mN\033[0m]"