Color in terminal error output
This commit is contained in:
parent
6bd3ed7b65
commit
072eeaa127
@ -95,13 +95,13 @@ impl FinishedComputation {
|
|||||||
pub fn to_repl(&self) -> String {
|
pub fn to_repl(&self) -> String {
|
||||||
match self.text_output {
|
match self.text_output {
|
||||||
Ok(ref s) => s.clone(),
|
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<String> {
|
pub fn to_noninteractive(&self) -> Option<String> {
|
||||||
match self.text_output {
|
match self.text_output {
|
||||||
Ok(ref s) => None,
|
Ok(ref s) => None,
|
||||||
Err(ref s) => Some(format!("Error: {}", s)),
|
Err(ref s) => Some(format!("{} {}", "Error: ".red().bold(), s))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user