Bugfix for Exit handling
Before adoption: this commit came in with the history the project adopted, so no landing records it.
`rv = BaseCommand.invoke(ctx); ...; ctx.exit(rv)` seems correct at first blush, but there are actually important subtleties to consider here. For example, chained commands will produce a list of outputs, and that can have the consequence that `rv` is truthy -- but full of falsey values, possibly meant to indicate success. Stick with the existing simple `ctx.exit()` call (no args) so that we don't run into these behaviors. Add comments to `BaseCommand.main` explaining what's going on and why the logic is a little more nuanced than you might first guess.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+17 added−4 removed
- other:+17 added−4 removed