ci: Avoid && dropping errors #32573

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2505-ci-bash-ugh changing 1 files +3 −1
  1. maflcko commented at 7:49 PM on May 20, 2025: member

    In bash, && will ignore errexit. This can lead to silently ignoring errors. Compare the output of:

    $ bash -c 'set -xe;   false && false   ; true; echo $?'
    + false
    + true
    + echo 0
    0
    

    In theory this could be fixed by using a subshell:

    $ bash -c 'set -xe; ( false && false ) ; true; echo $?'
    + false
    

    However, it is easier to just remove the &&.

    This was introduced in commit faa807bdf8c3002a28005b4765604f518a6f2736

  2. ci: Avoid && dropping errors fab97f583f
  3. DrahtBot commented at 7:49 PM on May 20, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32573.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK janb84, hebasto, laanwj

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. DrahtBot added the label Tests on May 20, 2025
  5. maflcko added this to the milestone 30.0 on May 20, 2025
  6. janb84 commented at 9:43 AM on May 21, 2025: contributor
  7. hebasto approved
  8. hebasto commented at 9:56 AM on May 21, 2025: member

    ACK fab97f583f119f43da352774479dd78e39729632.

    Could this approach be forced by a linter?

  9. maflcko commented at 10:27 AM on May 21, 2025: member

    Could this approach be forced by a linter?

    I don't know how, because ( a && b ) is used and is fine. My preference would be to just stop using bash, but writing this one in Python or Rust will bloat the code. :man_shrugging:

  10. laanwj commented at 11:06 AM on May 21, 2025: member

    My preference would be to just stop using bash

    Yes.

    but writing this one in Python or Rust will bloat the code. 🤷‍♂️

    That's good and bad, i mean bloated code that is straightforward to review might be preferable to a one-line magic incantation that has all kinds of unintuitive, hidden oopses.

  11. laanwj approved
  12. laanwj commented at 11:07 AM on May 21, 2025: member

    ACK fab97f583f119f43da352774479dd78e39729632

  13. janb84 commented at 11:08 AM on May 21, 2025: contributor

    My preference would be to just stop using bash

    Yes.

    but writing this one in Python or Rust will bloat the code. 🤷‍♂️

    That's good and bad, i mean bloated code that is straightforward to review might be preferable to a one-line magic incantation that has all kinds of unintuitive, hidden oopses.

    I second this !

  14. fanquake merged this on May 21, 2025
  15. fanquake closed this on May 21, 2025

  16. maflcko deleted the branch on May 21, 2025
  17. sedited referenced this in commit cb3cd9b8b9 on May 29, 2025
  18. maflcko commented at 8:16 AM on June 5, 2025: member
  19. achow101 referenced this in commit 4b8ac9eacd on Jun 10, 2025
  20. yuvicc referenced this in commit 069643f094 on Jul 6, 2025
  21. bug-castercv502 referenced this in commit 2858098810 on Sep 28, 2025
  22. Kino1994 referenced this in commit 567d1d77d0 on Jun 28, 2026
  23. Kino1994 referenced this in commit 93b1d4e0ac on Jun 28, 2026
  24. BigcoinBGC referenced this in commit b4b9a6a90d on Jun 30, 2026
  25. BigcoinBGC referenced this in commit 2d17280fe3 on Jun 30, 2026
  26. bitcoin locked this on Jul 30, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-11 10:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me