Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a configuration method to indicate that all .env files should be optional #45

Closed
MrDave1999 opened this issue Feb 27, 2022 · 0 comments · Fixed by #47
Closed

Add a configuration method to indicate that all .env files should be optional #45

MrDave1999 opened this issue Feb 27, 2022 · 0 comments · Fixed by #47
Labels
feature New feature or request
Milestone

Comments

@MrDave1999
Copy link
Owner

Example:

new EnvLoader()
      .AddEnvFile(".env.example1", Encoding.UTF8) 
      .AddEnvFile(".env.example2", encodingName: "UTF-8") 
      .AddEnvFile(".env.example3")
      .AllowAllEnvFilesOptional()
      .Load();

When calling the AllowAllEnvFilesOptional method, the loader will not generate any error when it does not found the .env files (.env.example1, .env.example2, .env.example3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
1 participant