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 command unset #1475

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

add command unset #1475

wants to merge 3 commits into from

Conversation

duthils
Copy link
Contributor

@duthils duthils commented Mar 29, 2024

Add an unset command to remove a key or item from the file.

Fixes #1305.

I'm not familiar with Go or Rust, so I mainly adapted what was already present in the set command.

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.

Thanks for your contribution! I've only had a few minutes so I only looked at the cmd/sops/main.go changes so far, I'll take a closer look at everything later.

cmd/sops/main.go Outdated Show resolved Hide resolved
cmd/sops/main.go Outdated Show resolved Hide resolved
cmd/sops/main.go Outdated Show resolved Hide resolved
Signed-off-by: Sebastien Duthil <[email protected]>
@duthils
Copy link
Contributor Author

duthils commented Mar 30, 2024

The test failure was due to using the same file test_unset.json for both JSON and YAML tests. I amended the commit to fix this issue.

sops.go Outdated Show resolved Hide resolved
sops.go Outdated Show resolved Hide resolved
sops.go Outdated Show resolved Hide resolved
sops.go Show resolved Hide resolved
Signed-off-by: Sebastien Duthil <[email protected]>
Signed-off-by: Sebastien Duthil <[email protected]>
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.

Remove key:value line from encrypted sops file by using sops --set command
2 participants