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

Allow to pass multiple paths to 'updatekeys' #1274

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

sj14
Copy link
Contributor

@sj14 sj14 commented Sep 10, 2023

Allow to pass multiple paths to the updatekeys command, e.g. sops updatekeys file1 file2 file3.

@sj14 sj14 force-pushed the sj/updatekeys-inputs branch 6 times, most recently from 2184382 to 319c322 Compare September 10, 2023 12:45
@sj14 sj14 changed the title Allow to pass multple paths to 'updatekeys' Allow to pass multiple paths to 'updatekeys' Sep 10, 2023
@sj14 sj14 marked this pull request as ready for review September 10, 2023 13:02
@sj14 sj14 marked this pull request as draft September 11, 2023 13:36
@sj14 sj14 force-pushed the sj/updatekeys-inputs branch 2 times, most recently from c6fb84d to 0cde35a Compare September 11, 2023 13:40
@sj14 sj14 marked this pull request as ready for review September 11, 2023 13:41
@felixfontein felixfontein added this to the v3.9.0 milestone Sep 16, 2023
Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Looks good to me.

cmd/sops/main.go Outdated Show resolved Hide resolved
@sj14 sj14 force-pushed the sj/updatekeys-inputs branch 3 times, most recently from 404355f to 7488de6 Compare November 1, 2023 12:41
Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

The current version makes the return value less usable. I'm not sure whether anyone relied on the return values of the updatekeys command, but in case any did, they are now broken.

How about slightly adjusting the behavior so that in case there is one argument, the old code is used, and if there are at least two arguments, the new code is used?

@sj14 sj14 force-pushed the sj/updatekeys-inputs branch 3 times, most recently from de99cef to 978514f Compare November 12, 2023 16:19
@sj14
Copy link
Contributor Author

sj14 commented Nov 12, 2023

How about slightly adjusting the behavior so that in case there is one argument, the old code is used, and if there are at least two arguments, the new code is used?

Adjusted. I'm also now printing the amount of failed key updates when multiple arguments are used. I hope that's fine.

@hiddeco hiddeco force-pushed the sj/updatekeys-inputs branch from 978514f to 071193c Compare December 15, 2023 21:59
Signed-off-by: Simon Jürgensmeyer <Simon.Juergensmeyer@gmail.com>
@hiddeco hiddeco force-pushed the sj/updatekeys-inputs branch from 071193c to b693f29 Compare December 15, 2023 22:32
@hiddeco hiddeco merged commit b54fa8a into getsops:main Dec 15, 2023
9 checks passed
@felixfontein
Copy link
Contributor

@sj14 thanks for your contribution!

@sj14 sj14 deleted the sj/updatekeys-inputs branch July 1, 2024 07:15
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.

3 participants