diff options
author | Jozef Behran <jozuejozef@gmail.com> | 2019-01-12 10:15:42 -0500 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2019-01-12 16:15:42 +0100 |
commit | 03cc93f48957a5dee04c56ff8c5b05d647e77d2d (patch) | |
tree | 1b209e0b9ed3cf98ff17f39e5478b3e63d1c433c | |
parent | a18c310adb075b1ba94950b6ee811c68dec2f66b (diff) | |
download | minetest-03cc93f48957a5dee04c56ff8c5b05d647e77d2d.tar.gz minetest-03cc93f48957a5dee04c56ff8c5b05d647e77d2d.tar.bz2 minetest-03cc93f48957a5dee04c56ff8c5b05d647e77d2d.zip |
Fix fake LINT check success (#8092)
The code 'if [ -z ${something} ]; then ... fi' means "if
${something} is an empty string, yell at the command line
about 'binary operator expected' and ignore the body of the
if statement, if ${something} is not an empty string,
the condition is false so ignore the body of the if
statement" which clearly isn't what the author wanted. Fix
it by adding a few quotes around the offending ${something}.
-rw-r--r-- | util/travis/lint.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/travis/lint.sh b/util/travis/lint.sh index 1174ed257..887e621f5 100644 --- a/util/travis/lint.sh +++ b/util/travis/lint.sh @@ -20,7 +20,7 @@ function perform_lint() { whitelisted=$(awk '$1 == "'$f'" { print 1 }' "$CLANG_FORMAT_WHITELIST") # If file is not whitelisted, mark a failure - if [ -z ${whitelisted} ]; then + if [ -z "${whitelisted}" ]; then errorcount=$((errorcount+1)) printf "The file %s is not compliant with the coding style" "$f" |