From 3662c87b1c84d5a023d8e61f3bc3073dbf9c4324 Mon Sep 17 00:00:00 2001 From: Guillaume Pasquet Date: Sat, 26 Feb 2022 09:31:28 +0000 Subject: Fix #11: add support for .env files --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index b7ce5ba..bbe2bf0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,8 @@ use std::env; use std::fs; use std::str::FromStr; +use dotenv::dotenv; + #[derive(Parser, Debug)] #[clap(version)] struct Args { @@ -95,7 +97,7 @@ fn run_file(args: &Args, executor: &mut Executor, file_name: &String) -> Result< fn main() { let args = Args::parse(); - + dotenv().ok(); let mut executor = Executor::new(Context::new(env::vars())); for file in args.files_iter() { -- cgit v1.2.3