-
Notifications
You must be signed in to change notification settings - Fork 4
Add --export
option to the secrets env
command
#145
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
Comments
I did a quick sanity check with
So while we can set |
I don't understand this sanity check? Why would we be using internal process.env? It would not be necessary.
27 Feb 2024 19:09:05 Brian Botha ***@***.***>:
…
I did a quick sanity check with
***@***.***:~/workspace/Polykey-CLI]$ node -e "process.env.test='value'"
***@***.***:~/workspace/Polykey-CLI]$ echo $test
***@***.***:~/workspace/Polykey-CLI]$
*
So while we can set *process.env.key* to be whatever, it will only afffect the current process and any children. Wit will not be exported to the environment running the command. We'll need to find an alternative.
—
Reply to this email directly, view it on GitHub[#145 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAE4OHNMECC3YI5WYEUAWTDYV2GT5AVCNFSM6AAAAABD5E4XAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRYGA2TQNRWGM].
You are receiving this because you are subscribed to this thread.
[Tracking image][https://github.com/notifications/beacon/AAE4OHOJ7KJHLVQVXI2Z6GDYV2GT5A5CNFSM6AAAAABD5E4XAWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTVJYYSO.gif]
|
Just checking if it was a viable way to do this but it doesn't work for our needs. I'll need to look into this more. |
I recall from discussion that this is not actually a use case we want to support. If you want to export the env variables from the Closing as not planned. |
This is impossible to do. |
Specification
We want to add export behaviour to the
secrets env
command. This will act similar to howexport key="value"
in linux. Essentially it will add the secrets selected with-e vault:secretPath
to be added to the current environment.This will need to work on all of the supported platforms. So it needs to work on windows too.
Unless I'm missing any nuance it should be as simple as adding the envs with
process.env[key]=value;
.We need to decide if it will work along side the other functionality or become the main function when run. For example, if we run the command with
polykey secrets env -e vault1:secret1 --export some command
will it runsome command
AND export to the current environment? OR just export? Same for the formatted outputs?Additional context
pk secrets env
command for meeting Development Environment Usecase #31secrets env
command #129secrets env
command formatting options #144Tasks
--export
flag which will add the selected secrets to the current environment.The text was updated successfully, but these errors were encountered: