From 674922f817fda8b6d0fa1b4d120a443544dd1fb5 Mon Sep 17 00:00:00 2001 From: Timon Date: Tue, 8 Jan 2019 13:15:57 +0100 Subject: [PATCH] Panic after upgrading to 0.5.3 fix (#73) --- src/kernel/windows_kernel/ansi_support.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kernel/windows_kernel/ansi_support.rs b/src/kernel/windows_kernel/ansi_support.rs index 89dd1e6..1f737c0 100644 --- a/src/kernel/windows_kernel/ansi_support.rs +++ b/src/kernel/windows_kernel/ansi_support.rs @@ -14,7 +14,10 @@ static ENABLE_ANSI: Once = ONCE_INIT; pub fn try_enable_ansi_support() -> bool { ENABLE_ANSI.call_once(|| { let command = EnableAnsiCommand::new(); - let success = command.enable().unwrap(); + let success = match command.enable() { + Ok(success) => { success }, + Err(_) => { false }, + }; set_is_windows_ansi_supportable(success); set_ansi_enabled(success);