mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(cli): enable backtrace on panic by default (#5942)
This commit is contained in:
@ -9,6 +9,11 @@ compile_error!("Cannot build the `reth` binary with the `optimism` feature flag
|
||||
|
||||
#[cfg(not(feature = "optimism"))]
|
||||
fn main() {
|
||||
// Enable backtraces unless a RUST_BACKTRACE value has already been explicitly provided.
|
||||
if std::env::var("RUST_BACKTRACE").is_err() {
|
||||
std::env::set_var("RUST_BACKTRACE", "1");
|
||||
}
|
||||
|
||||
if let Err(err) = reth::cli::run() {
|
||||
eprintln!("Error: {err:?}");
|
||||
std::process::exit(1);
|
||||
|
||||
@ -9,6 +9,11 @@ compile_error!("Cannot build the `op-reth` binary with the `optimism` feature fl
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
fn main() {
|
||||
// Enable backtraces unless a RUST_BACKTRACE value has already been explicitly provided.
|
||||
if std::env::var("RUST_BACKTRACE").is_err() {
|
||||
std::env::set_var("RUST_BACKTRACE", "1");
|
||||
}
|
||||
|
||||
if let Err(err) = reth::cli::run() {
|
||||
eprintln!("Error: {err:?}");
|
||||
std::process::exit(1);
|
||||
|
||||
Reference in New Issue
Block a user