env-cmd icon indicating copy to clipboard operation
env-cmd copied to clipboard

Allow setting default env files locations

Open squivix opened this issue 2 years ago • 1 comments

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:

https://github.com/toddbluhm/env-cmd/blob/8f35b71651f6a78710308ff38ab30896ea72ee8b/src/get-env-vars.ts#L6

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"]
  }

squivix avatar Aug 03 '23 09:08 squivix

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.

toddbluhm avatar Dec 09 '24 14:12 toddbluhm