-
Notifications
You must be signed in to change notification settings - Fork 910
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
cmd/sops: use --config in subcommands #559
base: main
Are you sure you want to change the base?
Conversation
@q3k Oh nice. Thank you for the patch! Would you mind pointing this PR at our In regards to testing, at the moment it looks like we don't have any functional tests for this, so if you'd like to add some that'd be great. Otherwise, I'd build this locally and confirm that it works with |
3829479
to
abea047
Compare
Just rebased against develop. I would appreciate if you tested it locally for now, I might take a stab at some tests tomorrow (and either update this PR or send off a new one), but I can't promise anything. |
cmd/sops/main.go
Outdated
@@ -960,13 +960,22 @@ func keyGroups(c *cli.Context, file string) ([]sops.KeyGroup, error) { | |||
return []sops.KeyGroup{group}, nil | |||
} | |||
|
|||
// getConfigPath returns the config path that should be used, either by finding it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the current phrasing is a bit confusing and could lead people to believe that it will first find from a given root, and it that fails it will use the one passed through the command line, when it's actually the opposite
Is there anything else that is needed to get this merged? /cc @ajvb |
@q3k can you address the review comment and rebase this PR? |
@flokli Apologies! I'll do this now. |
This needs yet another rebase unfortunately. |
@q3k would you mind rebasing another time, and signing off your commits? It would be really great to get this finally merged. |
I re-created the missing part in #1779. |
Currently that flag is not being used by subcommands (publish and updatekeys). This fixes that problem.
I'm not exactly sure how to go about testing this. Any ideas?