Skip to content

Commit

Permalink
fix(help): Command::print_help should respect disable_colored_help
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Aug 29, 2022
1 parent d3f0931 commit a7d7602
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 a7d7602

Please sign in to comment.