Skip to content

Commit

Permalink
Merge pull request #4139 from epage/help
Browse files Browse the repository at this point in the history
fix(help): Command::print_help should respect disable_colored_help
  • Loading branch information
epage committed Aug 29, 2022
2 parents d3f0931 + a7d7602 commit 6987ae9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -30,6 +30,10 @@ _gated behind `unstable-v4`_
<!-- next-header -->
## [Unreleased] - ReleaseDate

### Fixes

- *(help)* `Command::print_help` now respects `Command::colored_help`

## [3.2.17] - 2022-08-12

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions src/builder/command.rs
Expand Up @@ -744,7 +744,7 @@ impl<'help> App<'help> {
/// [`io::stdout()`]: std::io::stdout()
pub fn print_help(&mut self) -> io::Result<()> {
self._build_self();
let color = self.get_color();
let color = self.color_help();

let mut c = Colorizer::new(Stream::Stdout, color);
let usage = Usage::new(self);
Expand All @@ -769,7 +769,7 @@ impl<'help> App<'help> {
/// [`--help` (long)]: Arg::long_help()
pub fn print_long_help(&mut self) -> io::Result<()> {
self._build_self();
let color = self.get_color();
let color = self.color_help();

let mut c = Colorizer::new(Stream::Stdout, color);
let usage = Usage::new(self);
Expand Down

0 comments on commit 6987ae9

Please sign in to comment.