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

Allow setting default env files locations #367

Open
squivix opened this issue Aug 3, 2023 · 1 comment
Open

Allow setting default env files locations #367

squivix opened this issue Aug 3, 2023 · 1 comment

Comments

@squivix
Copy link

squivix commented Aug 3, 2023

I want to be able to permentantly set the default location to search for env files if it's not specified in the command.
Right now it's a constant:

const ENV_FILE_DEFAULT_LOCATIONS = ['./.env', './.env.js', './.env.json']

But I want to set it in some sort of config, possibly through the package.json file:

  "env-cmd": {
    "ENV_FILE_DEFAULT_LOCATIONS": ["./env/*.env"]
  }
@toddbluhm
Copy link
Owner

This is not a bad idea...although my question would be, why not just set the location on the CLI using -f? Just trying to understand the use case here.

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

3 participants
@toddbluhm @squivix and others