SOLVED: ignore_errors not working? #2137
-
I'm trying to setup mypy on a project that doesn't have fully correct type hints, but since it's already working, I didn't want to block builds on mypy errors and to just treat it as an informational nice-to-have.
but tox.ini still returns a non-zero error code. (tox -e mypy && echo "success")|| echo "failed"
...
ERROR: mypy: commands failed
failed Am I doing something wrong or is this a tox bug? Using 3.23.1. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You want the - prefix per https://tox.readthedocs.io/en/latest/config.html#conf-commands, ignore errors only allows you to continue but keeps the exit code see https://tox.readthedocs.io/en/latest/config.html#conf-ignore_errors |
Beta Was this translation helpful? Give feedback.
-
The option is documented here It just means that if there is more than one command and the first fails, continue to run the others, but still return non-zero. You want a non-zero return code, altough you have a failing command. Just prepend the command with a dash, e.g. |
Beta Was this translation helpful? Give feedback.
You want the - prefix per https://tox.readthedocs.io/en/latest/config.html#conf-commands, ignore errors only allows you to continue but keeps the exit code see https://tox.readthedocs.io/en/latest/config.html#conf-ignore_errors