Skip to content

Commit

Permalink
Auto merge of #2739 - alexcrichton:configure-colors, r=alexcrichton
Browse files Browse the repository at this point in the history
Configure colors of both stdout/stderr

Previously color configuration only affected stdout, not stder as well.

Closes #2734
  • Loading branch information
bors committed May 24, 2016
2 parents 1ed0727 + 45b896e commit 3ff108a
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 3ff108a

Please sign in to comment.