build.yml: Fix 'Print failure info' to not error

Print Failure Info is for printing differences detected by 'Test all'.  When some other step fails, then "*.exp" doesn't match any files at all, and _this_ step fails too.

We will assume that Github Actions always runs with bash as the shell (as it does today). In this case, we can set the  "nullglob" shell option, so that a non-existent glob expands to nothing, instead of to itself.
This commit is contained in:
Jeff Epler 2021-03-05 11:30:52 -06:00
parent 3c50918adc
commit f7e42bfebc

View File

@ -81,6 +81,7 @@ jobs:
working-directory: tests
- name: Print failure info
run: |
shopt -s nullglob;
for exp in *.exp;
do testbase=$(basename $exp .exp);
echo -e "\nFAILURE $testbase";