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

Warn/fail if the wrong number of arguments is provided #1342

Merged
merged 2 commits into from
Dec 16, 2023

Conversation

felixfontein
Copy link
Contributor

When warning, also inform about potentially ignored flags.

This improves UX because right now, many users find out that some of their flags are "ignored" (because the CLI library treats them as positional arguments, and sops only uses the first one of them). See for example #1259 or #598.

Either #1274 or this PR needs to be adjusted, whatever is merged first, since this PR is adding a warning for updatekeys, while that PR allows updatekeys to process multiple filenames.

cmd/sops/main.go Outdated Show resolved Hide resolved
felixfontein and others added 2 commits December 16, 2023 17:21
When warning, also inform about potentially ignored flags.

Signed-off-by: Felix Fontein <[email protected]>
Co-authored-by: Hidde Beydals <[email protected]>
Signed-off-by: Felix Fontein <[email protected]>
@felixfontein felixfontein merged commit 7655a68 into getsops:main Dec 16, 2023
9 checks passed
@felixfontein felixfontein deleted the cli branch December 16, 2023 16:58
@felixfontein
Copy link
Contributor Author

@hiddeco thanks for reviewing!

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.

2 participants