csachs / pyproject-flake8

pyproject-flake8 (pflake8), a monkey patching wrapper to connect flake8 with pyproject.toml configuration
The Unlicense
174 stars 16 forks source link

pflake8 doesn't propagate the flake8 exit code when used as a runnable module #19

Closed evertrol closed 1 year ago

evertrol commented 2 years ago

If I run

python -m pflake8 nonexisting.py 2>&1 > /dev/null
echo $?

the exit code is 0. (This is tested on macOS, zsh).

For comparison, the following variants all return 1 as exit code

pflake8 nonexisting.py 2>&1 > /dev/null
python -m flake8 nonexisting.py 2>&1 > /dev/null
flake8 nonexisting.py 2>&1 > /dev/null

I would definitely expect python -m pflake8 nonexisting.py to also have a non-zero exit code (exit code of 1, in fact).

csachs commented 1 year ago

Oups, completely missed that, should be fixed now.

evertrol commented 1 year ago

Thanks. I can confirm this works now. And just in time for 6.0.0, I see.