We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b6c7048 + 3219230 commit 0937334Copy full SHA for 0937334
dt-main/src/main.rs
@@ -1,10 +1,12 @@
1
-use std::env;
+use std::{env, panic};
2
3
use dt_precheck::{config::task_config::PrecheckTaskConfig, do_precheck};
4
use dt_task::task_runner::TaskRunner;
5
6
#[tokio::main]
7
async fn main() {
8
+ env::set_var("RUST_BACKTRACE", "1");
9
+
10
let args: Vec<String> = env::args().collect();
11
if args.len() < 2 {
12
panic!("no task_config provided in args");
dt-task/src/task_runner.rs
@@ -1,5 +1,4 @@
use std::{
- env,
fs::{self, File},
io::Read,
panic,
@@ -74,7 +73,6 @@ impl TaskRunner {
74
73
self.init_log4rs()?;
75
}
76
77
- env::set_var("RUST_BACKTRACE", "1");
78
panic::set_hook(Box::new(|panic_info| {
79
log_error!("panic: {}", panic_info);
80
}));
0 commit comments