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

Loading Vault files #90

Closed
TheRealFlyingCoder opened this issue Jun 8, 2023 · 4 comments
Closed

Loading Vault files #90

TheRealFlyingCoder opened this issue Jun 8, 2023 · 4 comments

Comments

@TheRealFlyingCoder
Copy link

TheRealFlyingCoder commented Jun 8, 2023

Just coming in here to say that we would be able to load in the new .env.vault standard if the dotenv version was bumped up to 16.1.4.

Currently we are able to do this by overriding the version resolution in your package.json:

	"resolutions": {
		"dotenv": "^16.1.4"
	},

If you are using .env.vault files you will also be required to set DOTENV_KEY prior to running dotenv-cli like so:

DOTENV_KEY=\"YOUR_KEY\" dotenv -e .env -- $script

Given this will be a new standard I think we should have a flag for passing the key in directly going forward?

@entropitor
Copy link
Owner

Feel free to make a PR to do so. I think --vault-key YOUR_KEY would work (I'd not add a short-hand version as I don't think this is to be typed often)

Btw, if you make the PR, ideally we just pass the vault key to dotenv without exposing it as an env variable (DOTENV_KEY in your example) to the process ($script in your example)

@motdotla
Copy link
Contributor

motdotla commented Aug 8, 2023

The dotenv bump is here: #94

Concerning the cli argument:

  1. I agree, no short hand needed.
  2. How about --dotenv-key rather than --vault-key ?

That would more closely match the pattern set here: https://github.com/motdotla/dotenv/tree/master#dotenv_key

@entropitor
Copy link
Owner

Okay, I think then it makes sense 👍

@entropitor
Copy link
Owner

I'm gonna close as not planned for now, but feel free to still create a PR if you still have this use case.

@entropitor entropitor closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2024
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