godotenv icon indicating copy to clipboard operation
godotenv copied to clipboard

dotenv should look up in parent directories for .env

Open cdignam-segment opened this issue 3 years ago • 6 comments

My .env file is at the root of my project, but when running tests, the current working directory is within test modules.

This would match the behavior of https://github.com/dotenv-rs/dotenv/tree/3c1a77bc95821777e5ceb996c5e0b082f2a3ea38#usage and https://github.com/theskumar/python-dotenv.

cdignam-segment avatar Dec 28 '21 22:12 cdignam-segment

Yep, you're right. Will bring that feature in as a breaking change

joho avatar Jan 02 '22 02:01 joho

@joho I made a PR to resolve this issue: https://github.com/joho/godotenv/pull/166

It would be great to get your feedback!

cdignam-segment avatar Jan 06 '22 15:01 cdignam-segment

Hi, any updates?

wengtad avatar May 08 '22 03:05 wengtad

I've been umming and ahhing on this one. I know I was very supportive when originally opened, but ever since I've been worrying about directory traversal attacks.

I'm about to close the door on breaking changes (see #182) but will hopefully include this one before I do (if I can come to comfort on the traversal risks)

joho avatar Jun 12 '22 02:06 joho