mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
MATCH is a wrapper around grep -E -q, thus MATCH -v ends up being grep -E -q -v. However, grep -v is peculiar as far as exit codes are concerned, and returns 0 when lines not matching the pattern were found in the input. For example, this command returns 1: $ cat <<EOF | grep -E -v foo foo foo foo EOF but this one returns 0, even though the pattern we don't want is in the input: cat <<EOF | grep -E -v foo; echo $? foo bar baz EOF In the tests, MATCH -v is used to check that the pattern does not appear in the input, which is incorrect. Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>