fix: accept dotenv failure

This commit is contained in:
Matthieu Bessat 2024-04-19 14:50:29 +02:00
parent 1d88702bf1
commit 8bd2a5753b

View file

@ -146,7 +146,10 @@ enum SourceType {
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
let app: App = argh::from_env(); let app: App = argh::from_env();
dotenvy::dotenv().expect("Could not load dot env file"); match dotenvy::dotenv() {
Ok(_) => eprintln!("Loaded env vars from .env"),
Err(err) => eprintln!("WARNING: loading .env failed {:?}", err),
}
let config: Config = envy::from_env().expect("Failed to load env vars"); let config: Config = envy::from_env().expect("Failed to load env vars");
if app.env_info { if app.env_info {