Skip to content

Commit

Permalink
Fix default path
Browse files Browse the repository at this point in the history
  • Loading branch information
allan2 committed Sep 9, 2024
1 parent a8ff414 commit 9b3db89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dotenvy-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions dotenvy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9b3db89

Please sign in to comment.