This does work, but seems to come out a little garbled in the raw logs on CI itself. It didn’t happen for me locally and it does not appear to be fault of the script itself, so I guess just GitHub UI processing stdout slowly or something, e.g.
02024-09-16T15:22:03.4198819Z + echo '=== END env ==='
12024-09-16T15:22:03.4199084Z + tee /dev/fd/63
22024-09-16T15:22:03.4199339Z ++ patch -p1
32024-09-16T15:22:03.4199590Z + '[' false = true ']'
42024-09-16T15:22:03.4199872Z + '[' true = true ']'
52024-09-16T15:22:03.4200388Z + export DIR_UNIT_TEST_DATA=/home/runner/work/_temp/ci/scratch/qa-assets/unit_test_data/
62024-09-16T15:22:03.4201123Z + DIR_UNIT_TEST_DATA=/home/runner/work/_temp/ci/scratch/qa-assets/unit_test_data/
72024-09-16T15:22:03.4201953Z + '[' '!' -d /home/runner/work/_temp/ci/scratch/qa-assets/unit_test_data/ ']'
82024-09-16T15:22:03.4202600Z + mkdir -p /home/runner/work/_temp/ci/scratch/qa-assets/unit_test_data/
92024-09-16T15:22:03.4204159Z + retry -- curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o /home/runner/work/_temp/ci/scratch/qa-assets/unit_test_data//script_assets_test.json
102024-09-16T15:22:03.4205183Z === END env ===