From 207fcb312cdd913e758e2747685f6a2f55ac4637 Mon Sep 17 00:00:00 2001 From: DustInDark Date: Fri, 24 Dec 2021 13:27:51 +0900 Subject: [PATCH] fixed output error if config directory is not found #347 --- src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.rs b/src/main.rs index 1d932468..18400a3a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,6 +65,14 @@ impl App { &analysis_start_time.day().to_owned() )); } + if !Path::new("./config").exists() { + AlertMessage::alert( + &mut BufWriter::new(std::io::stderr().lock()), + &"Hayabusa could not find the config directory.\nPlease run it from the Hayabusa root directory.\nExample: ./bin/hayabusa-1.0.0-windows-x64.exe".to_string() + ) + .ok(); + return; + } if configs::CONFIG.read().unwrap().args.args.len() == 0 { println!( "{}",