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

Add separate subcommands for encryption, decryption, rotating, editing, and setting values #1343

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

felixfontein
Copy link
Contributor

This is a Work in Progress for exploring how to implement #1333. Right now the new subcommands are basically a stripped-down copy'n'paste of the current "main" command.

Fixes #1333

@felixfontein felixfontein changed the title Add separate subcommands for encryption and decryption Add separate subcommands for encryption, decryption, rotating, editing, and setting values Nov 5, 2023
Copy link
Contributor

@Ph0tonic Ph0tonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that you tried to remove duplicated flags. Here are a few remaining ones if you want.

Comment on lines +678 to +689
cli.BoolFlag{
Name: "yes, y",
Usage: `pre-approve all changes and run non-interactively`,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still duplicated

[]cli.Flag{
cli.StringFlag{
Name: "file, f",
Usage: "the file to add the group to",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should write the file to delete the group key from

Comment on lines +422 to +433
cli.BoolFlag{
Name: "yes, y",
Usage: `pre-approve all changes and run non-interactively`,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated yes flag.

Comment on lines +1347 to +1368
cli.BoolFlag{
Name: "verbose",
Usage: "Enable verbose logging output",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still duplicated

Comment on lines +434 to +445
cli.BoolFlag{
Name: "verbose",
Usage: "Enable verbose logging output",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still duplicated

Comment on lines +349 to +360
cli.BoolFlag{
Name: "background",
Usage: "background the process and don't wait for it to complete",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated.

Comment on lines +295 to +306
cli.BoolFlag{
Name: "background",
Usage: "background the process and don't wait for it to complete",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated

cmd/sops/main.go Fixed Show fixed Hide fixed
cmd/sops/main.go Fixed Show fixed Hide fixed
@felixfontein
Copy link
Contributor Author

I saw that you tried to remove duplicated flags. Here are a few remaining ones if you want.

My goal with this PR for now is to check out how creating subcommands could work. There are quite a few PRs waiting to get processed that add a lot of rebase work to this one, so I might also just ditch it and re-start from scratch.

Thanks for marking the other ones, I'll take a look at them at some point once this is more stable...

When warning, also inform about potentially ignored flags.

Signed-off-by: Felix Fontein <[email protected]>
Signed-off-by: Felix Fontein <[email protected]>
@duthils
Copy link
Contributor

duthils commented Mar 21, 2024

@felixfontein can this PR be closed, now that #1391 is merged?

@felixfontein
Copy link
Contributor Author

This is maily still open for the flag de-duplication. I wanted to continue working on this once some more PRs are merged, which unfortunately never happened until now.

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

Successfully merging this pull request may close these issues.

Make encrypt, decrypt, rotate, set, and edit proper commands
3 participants