diff --git a/core-dump-composer/src/config.rs b/core-dump-composer/src/config.rs index eedc7ee..2afaeca 100644 --- a/core-dump-composer/src/config.rs +++ b/core-dump-composer/src/config.rs @@ -1,3 +1,5 @@ +extern crate dotenv; + use clap::{App, Arg, ArgMatches}; use libcrio::ImageCommand; use log::error; @@ -71,6 +73,11 @@ impl CoreConfig { dot_env_path.pop(); dot_env_path.push(".env"); + match dotenv::from_path(dot_env_path.clone()) { + Ok(v) => v, + Err(e) => error!("error loading .env file {}", e), + } + let mut crictl_config_path = env::current_exe()?; crictl_config_path.pop(); crictl_config_path.push("crictl.yaml");