Skip to content

Commit 6987ae9

Browse files
authored
Merge pull request #4139 from epage/help
fix(help): Command::print_help should respect disable_colored_help
2 parents d3f0931 + a7d7602 commit 6987ae9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ _gated behind `unstable-v4`_
3030
<!-- next-header -->
3131
## [Unreleased] - ReleaseDate
3232

33+
### Fixes
34+
35+
- *(help)* `Command::print_help` now respects `Command::colored_help`
36+
3337
## [3.2.17] - 2022-08-12
3438

3539
### Fixes

src/builder/command.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ impl<'help> App<'help> {
744744
/// [`io::stdout()`]: std::io::stdout()
745745
pub fn print_help(&mut self) -> io::Result<()> {
746746
self._build_self();
747-
let color = self.get_color();
747+
let color = self.color_help();
748748

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

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

0 commit comments

Comments
 (0)