Fix: {before-help} should have fallback just like {after-help}.

This commit is contained in:
Matt Kantor 2020-08-14 13:58:37 -07:00
parent 2c91800099
commit 4545a47ff6

View file

@ -1058,7 +1058,10 @@ impl<'help, 'app, 'parser, 'writer> Help<'help, 'app, 'parser, 'writer> {
}
b"before-help" => {
let before_help = if self.use_long {
self.parser.app.before_long_help
self.parser
.app
.before_long_help
.or(self.parser.app.before_help)
} else {
self.parser.app.before_help
};