aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index c3cf8951..427e75b2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -40,7 +40,7 @@ use tracing_subscriber::EnvFilter;
use utils::spawn;
use watcher::Watcher;
-use crate::utils::{REMOVE_ENV_RUST_BACKTRACE, REMOVE_ENV_RUST_LIB_BACKTRACE};
+use crate::utils::{cause_panic, REMOVE_ENV_RUST_BACKTRACE, REMOVE_ENV_RUST_LIB_BACKTRACE};
#[derive(Parser)]
#[command(author, version, about, long_about = None)]
@@ -67,6 +67,8 @@ enum Sub {
#[arg(short, long)]
config: Option<PathBuf>,
},
+ /// Cause a panic to check if the backtraces are good.
+ Panic,
}
fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -118,6 +120,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
info!("config is valid");
return Ok(());
}
+ Sub::Panic => cause_panic(),
}
}