From 4eeee9b11035a75a9260df304f046e578c0ea2c5 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 29 Aug 2022 10:47:00 -0500 Subject: [PATCH] fix(help): Command::print_help should respect disable_colored_help --- src/builder/command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builder/command.rs b/src/builder/command.rs index 9e0a64e6..fd2e95d8 100644 --- a/src/builder/command.rs +++ b/src/builder/command.rs @@ -717,7 +717,7 @@ impl Command { /// [`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 styled = StyledStr::new(); let usage = Usage::new(self); @@ -744,7 +744,7 @@ impl Command { /// [`--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 styled = StyledStr::new(); let usage = Usage::new(self);