We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b786fc commit ac092e6Copy full SHA for ac092e6
src/main.rs
@@ -100,15 +100,20 @@ define_events!(
100
},
101
);
102
103
-#[allow(clippy::too_many_lines)]
104
-fn main() {
105
- let _guard = init_tracing();
106
-
107
- // Enable ANSI support for Windows
+#[cfg(target_os = "windows")]
+fn enable_ansi() {
108
let ansi_res = ansi_term::enable_ansi_support();
109
if let Err(code) = ansi_res {
110
tracing::warn!("Failed to enable ANSI support. Error code: {:?}", code);
111
}
+}
+
+#[allow(clippy::too_many_lines)]
112
+fn main() {
113
+ let _guard = init_tracing();
114
115
+ #[cfg(target_os = "windows")]
116
+ enable_ansi();
117
118
let args = Args::parse();
119
0 commit comments