Skip to content

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 <felix@fontein.de>
@hiddeco hiddeco merged commit 105cda1 into getsops:main Dec 15, 2023
@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