forked from koalaman/shellcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
SC2158
Vidar Holen edited this page Oct 4, 2015
·
2 revisions
if [ false ]
then
echo "triggers anyways"
fi
if false
then
echo "never triggers"
fi
[ str ]
checks whether str
is non-empty. It doesn't matter if str
is false
, it will still be evaluated for non-emptyness.
Instead, use the command false
which -- as the manual puts it -- does nothing, unsuccessfully.
None