Skip to content

Commit 03ef55b

Browse files
committed
Don't assume color=always when explicitally specified
Fixes #31546
1 parent 5d771cd commit 03ef55b

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
@@ -934,17 +934,17 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
934934
Some("human") => ErrorOutputType::HumanReadable(color),
935935
Some("json") => ErrorOutputType::Json,
936936

937-
None => ErrorOutputType::default(),
937+
None => ErrorOutputType::HumanReadable(color),
938938

939939
Some(arg) => {
940-
early_error(ErrorOutputType::default(), &format!("argument for --error-format must \
941-
be human or json (instead was \
942-
`{}`)",
943-
arg))
940+
early_error(ErrorOutputType::HumanReadable(color),
941+
&format!("argument for --error-format must be human or json (instead \
942+
was `{}`)",
943+
arg))
944944
}
945945
}
946946
} else {
947-
ErrorOutputType::default()
947+
ErrorOutputType::HumanReadable(color)
948948
};
949949

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

0 commit comments

Comments
 (0)