You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running sphinx-lint in CI environment, I'd like to have the syntax issues to be both printed to the output and stored in a log file, because the output will be annotated with sphinx-lint-problem-matcher in the GitHub Actions output, and the log file will be upload as an artifact to notify outside GitHub.
In this scenario, If I simply redirect sphinx-lint > file I get no output, if I redirect using tee (to get both console and log) I won't get my Shell script to quit after the error status when set -e (If I set -o pipefail, tee wouldn't be run as sphinx-lint would exit with error before).
Taking Sphinx as example, its -w flag store warnings in log file but still print to output.
The text was updated successfully, but these errors were encountered:
If set -e (exit on error), it will quit after the first line. Surely this flag can be unset temporarily, but then it would mask other issues like e.g. sphinx-lint accidentally being not installed in a CI environment.
Today sphinx-lint already print syntax errors to stdout and exit with 1 when there syntax errors. With this other feature (flag to save to file as well), no other lines would be necessary to save the synax errors to a file as well.
By the way, sphinx-lint 2> logfile would be the correct redirect since my PR for sending errors to stderr
When running sphinx-lint in CI environment, I'd like to have the syntax issues to be both printed to the output and stored in a log file, because the output will be annotated with sphinx-lint-problem-matcher in the GitHub Actions output, and the log file will be upload as an artifact to notify outside GitHub.
In this scenario, If I simply redirect
sphinx-lint > file
I get no output, if I redirect usingtee
(to get both console and log) I won't get my Shell script to quit after the error status whenset -e
(If I set-o pipefail
,tee
wouldn't be run as sphinx-lint would exit with error before).Taking Sphinx as example, its
-w
flag store warnings in log file but still print to output.The text was updated successfully, but these errors were encountered: