Skip to content

Feature request: specific --fallback location #345

Description

@scottsandersdev

I have a feature request - It would be nice if we could offer specific fallback files with the --fallback option. I really like that with env-cmd I can now put all of my projects env files in a /env folder. In my repo one of the first steps is to create a .env.local file and put the variables in there and then you can run the project.

However, there may be some people that clone the repo and don't need to create a dotenv file, they just want to run a default setup. In those cases it would be nice if I had a .env file in my /env folder that I could use as a fallback file. As it is now, I'd need to keep a .env file in the root of the project, apart from all the others in the /env folder.

Another optional way to do this is to pass an array of precedence, similar to how create react app uses .env files. So I could pass something like --precedence /env/.env.local /env/.env and whichever of the files is found is the one that is used.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions