From 502170da63ca0046e1d3286a5687daa68b9746e0 Mon Sep 17 00:00:00 2001 From: Kiril Kovachev Date: Thu, 8 May 2025 23:18:32 +0100 Subject: [PATCH] fix: Do not panic if .env is not found. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 4830ca2..3f94600 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,7 +55,7 @@ fn setup(args: SetupArgs) -> Result<(), std::io::Error> { #[tokio::main] async fn main() -> Result<(), std::io::Error> { - dotenvy::dotenv().expect("Couldn't load .env file; please make sure to create one in the same directory as executing from!"); + dotenvy::dotenv().inspect_err(|_| eprintln!("Couldn't load .env file; please make sure to create one in the same directory as executing from!")).ok(); let cli = Cli::parse();