From 9b3db892b07a448f84fc075ab6801496b3a1f6b4 Mon Sep 17 00:00:00 2001 From: Allan <6740989+allan2@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:18:49 -0400 Subject: [PATCH] Fix default path --- dotenvy-macros/src/lib.rs | 6 +++--- dotenvy/src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dotenvy-macros/src/lib.rs b/dotenvy-macros/src/lib.rs index b5ddd705..79e6147f 100644 --- a/dotenvy-macros/src/lib.rs +++ b/dotenvy-macros/src/lib.rs @@ -10,10 +10,10 @@ use syn::{ /// Loads environment variables from a file and modifies the environment. /// -/// Three optional arguments are supported: `path`, `required`, and `override`. -/// Usage is like `#[dotenvy::load(path = ".env", required = true, override = true)]`. +/// Three optional arguments are supported: `path`, `required`, and `override_`. +/// Usage is like `#[dotenvy::load(path = ".env", required = true, override_ = true)]`. /// -/// The default path is ".env". The default sequence is `EnvSequence::InputThenEnv`. +/// The default path is "./env". The default sequence is `EnvSequence::InputThenEnv`. #[proc_macro_attribute] pub fn load(attr: TokenStream, item: TokenStream) -> TokenStream { let attrs = parse_macro_input!(attr as LoadInput); diff --git a/dotenvy/src/lib.rs b/dotenvy/src/lib.rs index c9b31f9c..09fbad95 100644 --- a/dotenvy/src/lib.rs +++ b/dotenvy/src/lib.rs @@ -133,9 +133,9 @@ pub struct EnvLoader<'a> { impl<'a> EnvLoader<'a> { #[must_use] - /// Creates a new `EnvLoader` with the path set to `./env` in the current directory. + /// Creates a new `EnvLoader` with the path set to `./.env` in the current directory. pub fn new() -> Self { - Self::with_path(".env") + Self::with_path("./.env") } /// Creates a new `EnvLoader` with the path as input.