Skip to content

Commit

Permalink
Indent is used both for encryption and decryption
Browse files Browse the repository at this point in the history
Also the indent for YAML files is limited to 2..9 by the YAML library used.

Signed-off-by: Felix Fontein <felix@fontein.de>
  • Loading branch information
felixfontein committed Dec 10, 2023
1 parent 0d58c35 commit 66398ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,11 @@ by configuring ``.sops.yaml`` with:
yaml:
indent: 2
.. note::
The YAML emitter used by sops only supports values between 2 and 9. If you specify 1,
or 10 and larger, the indent will be 2.
YAML anchors
~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion cmd/sops/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ func main() {
},
cli.IntFlag{
Name: "indent",
Usage: "the number of spaces to indent YAML or JSON encoded file for encryption",
Usage: "the number of spaces to indent YAML or JSON encoded file",
},
cli.BoolFlag{
Name: "verbose",
Expand Down

0 comments on commit 66398ca

Please sign in to comment.