Always enable ansi support on windows (#317)

This commit is contained in:
Casey Rodarmor 2018-05-06 22:02:17 -04:00 committed by GitHub
parent a3294822c3
commit 886220d4cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,9 @@ impl Slurp for fs::File {
}
pub fn run() {
#[cfg(windows)]
enable_ansi_support().ok();
let matches = App::new(env!("CARGO_PKG_NAME"))
.version(concat!("v", env!("CARGO_PKG_VERSION")))
.author(env!("CARGO_PKG_AUTHORS"))
@ -135,11 +138,6 @@ pub fn run() {
other => die!("Invalid argument `{}` to --color. This is a bug in just.", other),
};
if color.active() {
#[cfg(windows)]
enable_ansi_support().ok();
}
let set_count = matches.occurrences_of("SET");
let mut overrides = Map::new();
if set_count > 0 {