Repository navigation
Stop the refresh when a step inside a command substitution fails - #213
Merged
estebanzimanyi merged 1 commit intoOct 26, 2026
Conversation
refresh-binding.sh, provision-meos.sh and ecosystem-generate.sh run each command substitution with errexit (shopt -s inherit_errexit), so a step that fails inside one stops the script as it does outside one. resolve_repo, which refresh-binding.sh calls inside a substitution, stops at a fetch of a ref the remote does not have instead of checking out the commit fetched before it and answering its path. Every substitution whose failure the scripts expect keeps its own fallback (`|| echo unknown`), and missing_python_reqs answers the missing requirements with status 0.
Witness: on master, `refresh-binding.sh --jmeos-ref 88e7ef03` over a work dir whose JMEOS clone holds main prints `fatal: couldn't find remote ref 88e7ef03`, then builds the JMEOS jar from main and runs the binding's suite to `chain rc=0`, as if it had derived from the ref asked for. With this change the same refresh stops there with status 128 and builds no jar. bash -c 'set -euo pipefail; f(){ false; echo path; }; v="$(f)"; echo continued' prints `continued`; with inherit_errexit it exits 1.
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.
refresh-binding.sh, provision-meos.sh and ecosystem-generate.sh run each command substitution with errexit (shopt -s inherit_errexit), so a step that fails inside one stops the script as it does outside one. resolve_repo, which refresh-binding.sh calls inside a substitution, stops at a fetch of a ref the remote does not have instead of checking out the commit fetched before it and answering its path. Every substitution whose failure the scripts expect keeps its own fallback (
|| echo unknown), and missing_python_reqs answers the missing requirements with status 0.Witness: on master,
refresh-binding.sh --jmeos-ref 88e7ef03over a work dir whose JMEOS clone holds main printsfatal: couldn't find remote ref 88e7ef03, then builds the JMEOS jar from main and runs the binding's suite tochain rc=0, as if it had derived from the ref asked for. With this change the same refresh stops there with status 128 and builds no jar. bash -c 'set -euo pipefail; f(){ false; echo path; }; v="$(f)"; echo continued' printscontinued; with inherit_errexit it exits 1.