From 988c7bfc89d80df3bddd257817aa78bdd4935c4e Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 10 Dec 2023 10:36:01 +0100 Subject: [PATCH] Indent is used both for encryption and decryption Also the indent for YAML files is limited to 2..9 by the YAML library used. Signed-off-by: Felix Fontein --- README.rst | 5 +++++ cmd/sops/main.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index c6151315c..82cf622d4 100644 --- a/README.rst +++ b/README.rst @@ -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 ~~~~~~~~~~~~ diff --git a/cmd/sops/main.go b/cmd/sops/main.go index a1d4807a1..a382b411a 100644 --- a/cmd/sops/main.go +++ b/cmd/sops/main.go @@ -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",