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 {