summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 13ec797..667ac62 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,4 @@
#![cfg_attr(all(windows, not(debug_assertions)), windows_subsystem = "windows")]
-use std::error::Error;
use std::io::Cursor;
use std::path::Path;
@@ -52,8 +51,13 @@ const YELLOW: Color<f32> = Color {
const RESOURCE_DIR: &str = "res";
-fn main() -> Result<(), Box<dyn Error>>
+fn main() -> Result<(), EngineError>
{
+ #[cfg(windows)]
+ nu_ansi_term::enable_ansi_support()
+ .map_err(EngineError::from_system_defined_win32_error)
+ .with_context(|| "Failed to enable ANSI support")?;
+
tracing_subscriber::registry()
.with(
tracing_subscriber::fmt::layer()