Skip to content
9 changes: 6 additions & 3 deletions tooling/nargo_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ mod backends;
mod cli;
mod errors;

use color_eyre::{config::HookBuilder, eyre};
use color_eyre::config::HookBuilder;

const PANIC_MESSAGE: &str = "This is a bug. We may have already fixed this in newer versions of Nargo so try searching for similar issues at https://github.com/noir-lang/noir/issues/.\nIf there isn't an open issue for this bug, consider opening one at https://github.com/noir-lang/noir/issues/new?labels=bug&template=bug_report.yml";

fn main() -> eyre::Result<()> {
fn main() {
// Register a panic hook to display more readable panic messages to end-users
let (panic_hook, _) =
HookBuilder::default().display_env_section(false).panic_section(PANIC_MESSAGE).into_hooks();
panic_hook.install();

cli::start_cli()
if let Err(report) = cli::start_cli() {
eprintln!("{report}");
std::process::exit(1);
}
}