compound expression returns 1 if expression evaluates to 0

This commit is contained in:
Matt Sturgeon 2025-05-27 18:43:50 +01:00
parent 9caffee9b0
commit d9d1f5aac9
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -78,11 +78,11 @@ runs:
--log-format raw --log-format raw
then then
echo "incrementing ok from $ok" echo "incrementing ok from $ok"
(( ok++ )) ((++ok))
echo "incremented ok to $ok" echo "incremented ok to $ok"
else else
echo "incrementing error from $error" echo "incrementing error from $error"
(( error++ )) ((++error))
echo "incremented error to $error" echo "incremented error to $error"
if [ -z "$keep_going_flag" ]; then if [ -z "$keep_going_flag" ]; then
echo "Failing fast!" echo "Failing fast!"