Compare to empty string when start script test fails

pull/401/head
Tim Head 2018-09-14 21:04:06 +02:00
rodzic 7f1f270e12
commit 16079b9981
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -1,7 +1,8 @@
#!/bin/bash
set -euo pipefail
if [ "$TEST_START_VAR" != "var is set" ]
# set value of TEST_START_VAR to empty string when it is not defined
if [ "${TEST_START_VAR:-}" != "var is set" ]
then
echo "TEST_START_VAR is not set"
exit 1