summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas M. DuBuisson <tommd@musedev.io>2020-08-03 19:12:34 -0700
committerDaniel Stenberg <daniel@haxx.se>2020-08-04 09:51:01 +0200
commit30974cb895756e159d21403c5960d52f0c55dfd7 (patch)
treea486b209f8ab1af5ecd65a6ae390552dddb0026a /scripts
parent7f187d897c000ea64d38aa29026a7837a88427df (diff)
downloadcurl-30974cb895756e159d21403c5960d52f0c55dfd7.tar.gz
travis/script.sh: fix use of `-n' with unquoted envvar
Shellcheck tells us "-n doesn't work with unquoted arguments. quote or use [[ ]]." And testing shows: ``` docker run --rm -it ubuntu bash root@fe85ce156856:/# [ -n $DOES_NOT_EXIST ] && echo "I ran" I ran root@fe85ce156856:/# [ -n "$DOES_NOT_EXIST" ] && echo "I ran" root@fe85ce156856:/# ``` Closes #5773
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/travis/script.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/travis/script.sh b/scripts/travis/script.sh
index b71f20a66..147b62886 100755
--- a/scripts/travis/script.sh
+++ b/scripts/travis/script.sh
@@ -84,7 +84,7 @@ if [ "$T" = "normal" ]; then
if [ -z $NOTESTS ]; then
make test-nonflaky
fi
- if [ -n $CHECKSRC ]; then
+ if [ -n "$CHECKSRC" ]; then
make checksrc
fi
fi