From 34086b3b2be7db2c5643f96d8a748f090bc8e9df Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 22 Mar 2018 03:37:48 -0700 Subject: [PATCH] Color in terminal error output --- schala-repl/src/language.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schala-repl/src/language.rs b/schala-repl/src/language.rs index e75e243..52c3ae4 100644 --- a/schala-repl/src/language.rs +++ b/schala-repl/src/language.rs @@ -95,13 +95,13 @@ impl FinishedComputation { pub fn to_repl(&self) -> String { match self.text_output { Ok(ref s) => s.clone(), - Err(ref s) => format!("Error: {}", s) + Err(ref s) => format!("{} {}", "Error: ".red().bold(), s) } } pub fn to_noninteractive(&self) -> Option { match self.text_output { Ok(ref s) => None, - Err(ref s) => Some(format!("Error: {}", s)), + Err(ref s) => Some(format!("{} {}", "Error: ".red().bold(), s)) } } }