Skip to content

Commit

Permalink
Color errors
Browse files Browse the repository at this point in the history
  • Loading branch information
io12 committed Nov 3, 2019
1 parent 32608c3 commit 7d9f1b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mod util;

use crate::opts::Opts;

use colored::Colorize;
use structopt::StructOpt;

/// ~Result~ wrapper that specialized ~Result~ types can convert to
Expand Down Expand Up @@ -37,7 +38,7 @@ fn try_main() -> Result<()> {
/// Top-level error catcher
fn main() {
if let Err(err) = try_main() {
eprintln!("pwninit: error: {}", err);
eprintln!("{}", format!("error: {}", err).red().bold());
std::process::exit(1);
}
}

0 comments on commit 7d9f1b9

Please sign in to comment.