From 886220d4cceb26ed21b60d68596ecc086973b542 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sun, 6 May 2018 22:02:17 -0400 Subject: [PATCH] Always enable ansi support on windows (#317) --- src/run.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/run.rs b/src/run.rs index 9b45cd7..cfdac6f 100644 --- a/src/run.rs +++ b/src/run.rs @@ -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 {