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

Docs: indent is used both for encryption and decryption #1372

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

felixfontein
Copy link
Contributor

Right now the documenation of the --indent option says it's only used for encryption, while it is also used for decryption.

While testing this I noticed that for indenting YAML files, only indents of 2 to 9 are used. If you specify 1, or 10 or larger, the indent is ignored. This comes from go-yaml: https://github.com/go-yaml/yaml/blob/f6f7691b1fdeb513f56608cd2c32c51f8194bf51/emitterc.go#L328-L330

CC @Ph0tonic

@felixfontein
Copy link
Contributor Author

(When I tested it I started with --indent 10 to have a ridiculous value that's easy to spot. I was surprised that it resulted in an indent of 2, and then started probing around...)

Also the indent for YAML files is limited to 2..9 by the YAML library used.

Signed-off-by: Felix Fontein <[email protected]>
@hiddeco hiddeco merged commit 105cda1 into getsops:main Dec 15, 2023
10 checks passed
@felixfontein felixfontein deleted the indent branch December 15, 2023 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants