dotenv-cli icon indicating copy to clipboard operation
dotenv-cli copied to clipboard

Add --override flag to override any existing environment variables

Open raxityo opened this issue 3 years ago • 2 comments

  • Updates dotenv to 14.2.0 to get the override config.
  • Updates dotenv-expand to 6.0.1 to take advantage of some new features such as https://github.com/motdotla/dotenv-expand/pull/39
  • closes #62

raxityo avatar Jan 18 '22 15:01 raxityo

Any update for this PR?

kenberkeley avatar Apr 17 '22 13:04 kenberkeley

The problem is that --override doesn't really work well together with multiple env files. I think it makes more sense to add a flag to ignore a specific env variable already set. Because all other use cases can be achieved already AFAIK.

It seems some people also want this flag for the wrong reasons (reverting the order of files, while you can just pass -e in the reverse order as well to achieve this)

entropitor avatar Apr 17 '22 20:04 entropitor

@entropitor in my case I need to override an environment variable given to a pod (for example overriding the default connection string for test purposes). any chance we can merge this PR?

IdanDavidi avatar Aug 09 '22 22:08 IdanDavidi

@IdanDavidi This PR is broken as you can see here https://github.com/entropitor/dotenv-cli/pull/63#discussion_r788541172.

I think something like https://github.com/entropitor/dotenv-cli/pull/63#issuecomment-1100945178 could work but nobody seems to be willing to put the work in so I don't think it's happening.

entropitor avatar Aug 10 '22 13:08 entropitor