Repository navigation
artifact-helpers: survive bash -e - #555
Merged
Merged
Conversation
`restore=$(shopt -p nullglob)` exits 1 when nullglob is off, which it is in the workflow shell. Under the `bash -e` that GitHub runs steps with, that ended "Pack artifact" before tar ran: every job on #512 and #550 built fine and then failed with nothing in the log but the command. The self-test never saw it because `pack_packages ... || fail` suppresses errexit. Enumerate package files with a loop instead of toggling shell options, and add a test that calls both helpers under `bash -e` exactly as the workflows do; it fails against the old helper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Follow-up to #553.
restore=$(shopt -p nullglob)exits 1 when nullglob is off, and GitHub runsrun:steps underbash -e, so "Pack artifact" died beforetarran. Every build job on #512 and #550 succeeded and then failed at that step with no message. The self-test missed it becausepack_packages ... || failsuppresses errexit.What
bash -eexactly as the workflows call them. It fails against the old helper and passes against this one.Verified
tests/artifact-helpers.sh: 7/7, and the new case fails when run against the previous helper.bash -e -c 'source helpers/artifact-helpers.sh; pack_packages <dir> packages.tar; tar -tvf packages.tar'with acursor-cli-1:...file: packs and lists.