Use "grep -xF ... >/dev/null" instead of "grep -qxF ..."
authorTom Clegg <tom@curoverse.com>
Mon, 2 May 2016 21:13:35 +0000 (17:13 -0400)
committerTom Clegg <tom@curoverse.com>
Mon, 2 May 2016 21:13:35 +0000 (17:13 -0400)
commit513c30b5c5c2b3dd72894667eb0e51e24c9d4182
tree91b9cadb18c7f9cfe2a5abab331cd7baea6fd034
parent25505fc5105bc776ed2d6d898f18f91d6451088b
Use "grep -xF ... >/dev/null" instead of "grep -qxF ..."

1. -q "Exit immediately with zero status if any match is found, even if
an error was detected." --grep(1)

Depending on buffering and timing, if grep exits early (before
consuming stdin) "docker images" can receive SIGPIPE and exit
non-zero. We use "set -o pipefail" here, so this fails the "docker
load" phase and then the whole job.

2. "Portable shell scripts should avoid both -q and -s and should
redirect standard and error output to /dev/null instead." --grep(1)

No issue #
sdk/cli/bin/crunch-job