From d2ee3d8151d28ae947d586cb514dc195e32166b3 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 18 Jan 2021 11:23:04 -0700 Subject: runner.sh : deal with bash 'set -e' Release trigger script failed[1] because the entire script runs under 'set -e'; so a 'grep -- -dev' that finds no results will cause a nonzero exit status and hence the entire script to fail. Work around that. [1] https://cirrus-ci.com/task/4541290882793472 Signed-off-by: Ed Santiago --- contrib/cirrus/runner.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'contrib/cirrus/runner.sh') diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index b0060163e..572f0b44a 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -210,7 +210,8 @@ function _run_release() { bin/podman info msg "Checking podman release (or potential release) criteria." - dev=$(bin/podman info |& grep -- -dev) + # We're running under 'set -eo pipefail'; make sure this statement passes + dev=$(bin/podman info |& grep -- -dev || echo -n '') if [[ -n "$dev" ]]; then die "Releases must never contain '-dev' in output of 'podman info' ($dev)" fi -- cgit v1.2.3-54-g00ecf