Skip to content

Commit 2e2f2fd

Browse files
committed
Fixed ANSI codes on Windows
1 parent 09953f5 commit 2e2f2fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ impl<'a> CommandFlag<'a> {
132132
}
133133

134134
fn main() {
135+
#[cfg(target_os = "windows")]
136+
ansi_term::enable_ansi_support().unwrap_or_else(|err_code| {
137+
print_warn(format!("Failed to enable ANSI color codes: {}", err_code));
138+
});
139+
135140
let cl_settings = get_command_line_settings();
136141
let alias_res = cl_settings.get_command_alias();
137142

0 commit comments

Comments
 (0)