Skip to content

Commit 6e01c09

Browse files
committed
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. Following https://stackoverflow.com/questions/4839214/does-ash-have-an-equivalent-to-bashs-nullglob-option detect when "*.exp" doesn't match anything and avoid an error. This is hard to test, so testing performed: Looked at 7 lines of shell script and was unable to see any problems. This is an alternative to #4334, which would remove the step entirely. It is undesirable to do that, as we wouldn't be able to see the information about the failures that occurred anymore.
1 parent 3c50918 commit 6e01c09

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ jobs:
8181
working-directory: tests
8282
- name: Print failure info
8383
run: |
84-
for exp in *.exp;
84+
set -- ./*.exp
85+
[ -e "$1" ] || shift
86+
for exp;
8587
do testbase=$(basename $exp .exp);
8688
echo -e "\nFAILURE $testbase";
8789
diff -u $testbase.exp $testbase.out;

0 commit comments

Comments
 (0)