1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-04 16:45:06 -05:00

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
This commit is contained in:
Thomas M. DuBuisson 2020-08-03 19:12:34 -07:00 committed by Daniel Stenberg
parent 7f187d897c
commit 30974cb895
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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