mirror of
https://github.com/nelsbrock/disbahn.git
synced 2026-08-14 22:26:49 +02:00
ignore missing .env file
This commit is contained in:
+5
-1
@@ -10,7 +10,11 @@ fn env_var(name: &str) -> anyhow::Result<String> {
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> anyhow::Result<()> {
|
async fn main() -> anyhow::Result<()> {
|
||||||
dotenvy::dotenv()?;
|
if let Err(err) = dotenvy::dotenv() {
|
||||||
|
if !err.not_found() {
|
||||||
|
return Err(err).context("Unable to load .env file");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
env_logger::builder()
|
env_logger::builder()
|
||||||
.filter_module(module_path!(), log::LevelFilter::Debug)
|
.filter_module(module_path!(), log::LevelFilter::Debug)
|
||||||
|
|||||||
Reference in New Issue
Block a user