From 45b896ec55364ce58c57f3fdb101af81b621b7de Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 24 May 2016 11:52:31 -0700 Subject: [PATCH] Configure colors of both stdout/stderr Previously color configuration only affected stdout, not stder as well. Closes #2734 --- src/cargo/core/shell.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cargo/core/shell.rs b/src/cargo/core/shell.rs index ca3ff690c35..c6919840c7b 100644 --- a/src/cargo/core/shell.rs +++ b/src/cargo/core/shell.rs @@ -111,7 +111,7 @@ impl MultiShell { } pub fn set_color_config(&mut self, color: Option<&str>) -> CargoResult<()> { - self.out.set_color_config(match color { + let cfg = match color { Some("auto") => Auto, Some("always") => Always, Some("never") => Never, @@ -120,7 +120,9 @@ impl MultiShell { Some(arg) => bail!("argument for --color must be auto, always, or \ never, but found `{}`", arg), - }); + }; + self.out.set_color_config(cfg); + self.err.set_color_config(cfg); Ok(()) }