-
Notifications
You must be signed in to change notification settings - Fork 879
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
Add a clue for editors under "sops edit" #1675
base: main
Are you sure you want to change the base?
Conversation
Sometimes there are things we'd prefer our editors do differently when editing files with secrets in them: different configuration, disable certain plugins, etc. This change sets a clue in the launched editor's environment that can be used to easily and trivially determine if the editor was launched by `sops edit`. Signed-off-by: Chris Weyl <[email protected]>
Thanks for your contribution! I'm not sure that's a good idea though (are there other programs which do similar things? I'm not aware of any, but that doesn't mean there isn't). I think setting |
Correct me if I'm wrong, but the
|
Well, other programs can also set |
Because the work in the other PR is not a solution to this problem. Nothing we do here can control other programs setting env variables. What we can control is ensuring a specific var will always be set in the editor's environment, for editors launched by |
You use #1611 by pointing Which editor is used and how that editor is configured is highly system dependent (and thus perfectly suited for system-wide or user-wide env variables). If you can control the use of |
Ah, I see what you're saying now. Using |
Sometimes there are things we'd prefer our editors do differently when editing files with secrets in them: different configuration, disable certain plugins, etc. This change sets a clue in the launched editor's environment that can be used to easily and trivially determine if the editor was launched by
sops edit
.