diff options
author | Fly me to the moon <git@bigly.dog> | 2020-05-08 22:20:47 -0700 |
---|---|---|
committer | Fly me to the moon <git@bigly.dog> | 2020-05-08 22:20:47 -0700 |
commit | 3726ffe23aea2418451ca8ab1be8d7820495f992 (patch) | |
tree | 236ac13baf3bcefeea288098f8cfe6ba92cb9a08 | |
parent | afe54cc6338c91fa5e00f6e14ec77eb4bf2c4494 (diff) |
red colour for err0.1.0
-rw-r--r-- | Cargo.toml | 5 | ||||
-rw-r--r-- | src/main.rs | 3 |
2 files changed, 5 insertions, 3 deletions
@@ -10,10 +10,11 @@ edition = "2018" either = "1" futures = "0.3" itertools = "0.9" -async-std = { version = "1", features = ["unstable"] } clap = { version = "3.0.0-beta.1", features = ["wrap_help"] } +async-std = { version = "1", features = ["unstable"] } +num_cpus = "1" regex = "1" aho-corasick = "0.7" difflib = "0.4" -num_cpus = "1" uuid = { version = "0.8", features = ["v4"] } +ansi_term = "0.12" diff --git a/src/main.rs b/src/main.rs index 266a3bf..545b860 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,4 @@ +use ansi_term::Colour; use argparse::{Arguments, Options}; use async_std::{ io, @@ -95,7 +96,7 @@ fn stream_stdout(receiver: Receiver<SadResult<String>>) -> JoinHandle<()> { } fn err_exit(err: Failure) -> ! { - eprintln!("{:#?}", err); + eprintln!("{}", Colour::Red.paint(format!("{:#?}", err))); process::exit(1) } |