Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(help): Command::print_help should respect disable_colored_help #4139

Merged
merged 1 commit into from Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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