Skip to content

Commit 2a86208

Browse files
Stebalienbrson
authored andcommitted
Don't assume color=always when explicitally specified
Fixes rust-lang#31546
1 parent edf0d32 commit 2a86208

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/librustc/session/config.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -930,17 +930,17 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
930930
Some("human") => ErrorOutputType::HumanReadable(color),
931931
Some("json") => ErrorOutputType::Json,
932932

933-
None => ErrorOutputType::default(),
933+
None => ErrorOutputType::HumanReadable(color),
934934

935935
Some(arg) => {
936-
early_error(ErrorOutputType::default(), &format!("argument for --error-format must \
937-
be human or json (instead was \
938-
`{}`)",
939-
arg))
936+
early_error(ErrorOutputType::HumanReadable(color),
937+
&format!("argument for --error-format must be human or json (instead \
938+
was `{}`)",
939+
arg))
940940
}
941941
}
942942
} else {
943-
ErrorOutputType::default()
943+
ErrorOutputType::HumanReadable(color)
944944
};
945945

946946
let unparsed_crate_types = matches.opt_strs("crate-type");

0 commit comments

Comments
 (0)