Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion contrib/cirrus/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '')
Copy link
Collaborator

@zhangguanzhang zhangguanzhang Jan 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dev=$(bin/podman info |& grep -- -dev || echo -n '')
dev=$(bin/podman info |& grep -- -dev || true )

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this will be better

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhangguanzhang thank you, why do you prefer that form? I chose echo -n '' because the expression is intended as a string capture, and I wanted to make it easily clear to a maintainer that the fallthrough is an empty string. true is logically equivalent, but could make a future maintainer stop to think it through. (At least, that was my thinking earlier today, and I still think it holds). What do you like about the true form?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree with you

if [[ -n "$dev" ]]; then
die "Releases must never contain '-dev' in output of 'podman info' ($dev)"
fi
Expand Down