-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
strict_errexit message missing code location #2118
Comments
This gives a location for issue #2118. But it would better to attribute it to a child node of the redirect, not the redirect itself.
And point to a more precise location. This affects the error in issue #2118. [doc] Fix for CI
Thanks for the report - I improved the message to look like this
OILS-ERR-300 refers to a new message in the error catalog, which will be rendered shortly |
There is a long doc about out error handling philosophy, which is explicit and is designed not to lose any exit codes http://www.oilshell.org/release/0.23.0/doc/error-handling.html
Hm arguably it could be relaxed for this case, because there is only one command. The problem is when the I think that statement can be written
that is probably the same thing
|
The problem is that the shell that don't support Initially the check was |
OK the docs rendered now: https://op.oilshell.org/uuu/github-jobs/8214/ovm-tarball.wwz/_release/VERSION/doc/error-catalog.html I think the idioms for OSH and YSH will be very different here obviously if you switch to YSH, then the script won't work under any other shell But for OSH, there is an extremely large common subset with bash and POSIX shell thanks for reporting the missing location! |
I will try make at least a part of the script work on both; the script is already tested on more than 10 shells so it doesn't use much advanced features. |
I'm using ysh from here: https://op.oilshell.org/uuu/github-jobs/8206/cpp-tarball.wwz/_release/oils-for-unix.tar
I was trying to run this script with ysh: https://github.com/micro5k/microg-unofficial-installer/blob/main/tools/bits-info.sh
and the only thing it say is this:
[??? no location ???] fatal: strict_errexit only allows simple commands in conditionals (got command.Redirect).
I think it should at least say the line number.
The text was updated successfully, but these errors were encountered: