Color in terminal error output
This commit is contained in:
parent
fd4f5e17df
commit
34086b3b2b
@ -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