-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build.yml: Fix 'Print failure info' to not error #4340
Conversation
8cbbee9
to
6e01c09
Compare
I was unable to determine whether the CI is guaranteed to run with the bash as the shell. The snippet above is intended to work with any sh. If it's guaranteed to be bash, then nullglob is a better solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this by hand, and it works, but it's pretty obscure. Could you add a comment about what it's doing?
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.
6e01c09
to
f7e42bf
Compare
The shell is bash now, and can't be changed lightly without breaking workflows, so let's assume it. I've changed the code to set the nullglob shell option instead of using the complicated and portable way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okee dokee, thanks!
Build failure is a network glitch. |
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 the shell is bash and use the easy "shopt" way of fixing the problem, so that ".exp" expands to nothing (instead of ".exp") if there are no matches.
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.