Skip to content

Commit

Permalink
Exit with 1 on Err (use-ink#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Müller authored Nov 16, 2020
1 parent 69a9fae commit 3967026
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,14 @@ fn main() {
let Opts::Contract(args) = Opts::from_args();
match exec(args.cmd) {
Ok(msg) => println!("\t{}", msg),
Err(err) => eprintln!(
"{} {}",
"ERROR:".bright_red().bold(),
format!("{:?}", err).bright_red()
),
Err(err) => {
eprintln!(
"{} {}",
"ERROR:".bright_red().bold(),
format!("{:?}", err).bright_red()
);
std::process::exit(1);
}
}
}

Expand Down

0 comments on commit 3967026

Please sign in to comment.