Added error handling for no config

This commit is contained in:
Joe Bellus 2022-09-25 13:44:06 -04:00
parent d49cfb3a36
commit 4725786ee1
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ async fn main() {
}
pub async fn run() -> anyhow::Result<()> {
let cfg_path = find_config("conductor.yml").unwrap();
let cfg_path = find_config("conductor.yml")
.ok_or_else(|| anyhow::anyhow!("No config file found. Create a conductor.yml.\nSee http://conductor.5sigma.io/articles/config"))?;
std::env::set_current_dir(cfg_path.parent().unwrap())?;