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

dotenvy::dotenv_if_exists() -> Result<()> #140

Open
stepancheg opened this issue Jan 9, 2025 · 2 comments
Open

dotenvy::dotenv_if_exists() -> Result<()> #140

stepancheg opened this issue Jan 9, 2025 · 2 comments

Comments

@stepancheg
Copy link

New function:

  • Err if could not read file
  • Ok if doesn't exist
@allan2
Copy link
Owner

allan2 commented Jan 9, 2025

Can you elaborate? What functionality are you looking for?

@stepancheg
Copy link
Author

stepancheg commented Jan 9, 2025

To be able to write a oneliner:

dotenvy::dotenv_if_exists()?;

Which would:

  • fail on IO errors
  • succeed on missing .env file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants