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

Documentation updates: .env question #5

Open
danenania opened this issue Jan 16, 2019 · 5 comments
Open

Documentation updates: .env question #5

danenania opened this issue Jan 16, 2019 · 5 comments

Comments

@danenania
Copy link

Hey @SeriousM, I'm working on beefing up the documentation to make it consistent with others, and had a question: is the package attempting to load a .env file from the project root before executing the envkey binary? I didn't see this in a quick scan of the code, so I wanted to check.

If not, could we add this step, perhaps with a package like this one for the sake of consistency?

@SeriousM
Copy link
Collaborator

SeriousM commented Jan 16, 2019 via email

@SeriousM
Copy link
Collaborator

Btw, the package supports windows (x64) as well as linux.

@danenania
Copy link
Author

Ok thanks. There was a similar issue of determining project root in envkey-python, which was solved with a os.getcwd() call, which gives whatever directory the current process is started from.

From this SO thread it seems that either System.IO.Directory.GetCurrentDirectory(); or System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath); could have potential?

@SeriousM
Copy link
Collaborator

SeriousM commented Jan 16, 2019 via email

@danenania
Copy link
Author

I see, but in these situations where there is no simple concept of a 'root directory' then it's fine if we just don't find a .env, since we'll still check for the ENVKEY environment variable as you're already doing. The main use of the .env is in development, so as long it would find the .env file in most common development use cases, that would be sufficient.

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