Skip to content

Commit

Permalink
Configure colors of both stdout/stderr
Browse files Browse the repository at this point in the history
Previously color configuration only affected stdout, not stder as well.

Closes #2734
  • Loading branch information
alexcrichton committed May 24, 2016
1 parent ca743f3 commit 45b896e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cargo/core/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(())
}

Expand Down

0 comments on commit 45b896e

Please sign in to comment.