Closed DMyachin closed 1 year ago
@pnu-s ?
Sorry for the delayed answer!
My proposal was not just to use the exit-code
name rather than no-exit-code
but to offer the user to specify its error code (0 to avoid failing totally, 1 to overwrite the current behavior which returns the number of trackers, or other)
That would improve the user experience in my opinion
In terms of code, it would mean:
See new commit
if all([counter, forced_code is not None]):
sys.exit(forced_code)
sys.exit(counter)
0 is False in Python.
If counter is not zero (has trackers) AND code overwriting is set to any int value, the value will be used else counter.
LGTM, thanks for your quick changes!
You'll just need to remove that extra blank line to make the linter pass, and I'll be able to merge it :rocket:
Added flag
--no-exit-counter
that allows get exit code 0 if no any errors appears.