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

starting my application failed if .env is not exist. #506

Open
maoryadin opened this issue Jun 23, 2024 · 1 comment
Open

starting my application failed if .env is not exist. #506

maoryadin opened this issue Jun 23, 2024 · 1 comment

Comments

@maoryadin
Copy link

This is weird behaviour, espically because i have .env.defaults.
starting my application failed if .env is not exist.

Why it is strictly needed, if i do not want to include .env in addition for my .env.defaults?
Hope someone can help me understand it better, thank you.

@maoryadin maoryadin changed the title astarting my application failed if .env is not exist. starting my application failed if .env is not exist. Jun 23, 2024
@littlen101
Copy link

Think its because the default is set and then it uses that as a prefix to find .defaults / would have to see what is going on and experiment with it. Could try to see if allowEmptyVar could be a work around. That would require safe as well, but use case is still interesting.

Learning and playing rn and I was setting up my project in this exact manner. To get it to work I had to change the path to the environment that I wanted and then enable defaults more so to be a common amongst my different environments. Which is what I assume the intended functionality was supposed to be.

Wasn't very straight forward and don't actually know if that's what it was meant for because originally I just wanted to use safe to load the specific environment I wanted and populate what wasn't declared and assumed since I had defaults it would merge that first then use my specific environment.

Anyway. Assuming that this would need a ".env" file to start with and then it can work and it won't create one just utilize what is given. I only very briefly scrolled through code so most of this is black box analysis. Salt to taste.

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