Skip to content

Commit

Permalink
Add checks for indentation value
Browse files Browse the repository at this point in the history
Signed-off-by: Bastien <[email protected]>
  • Loading branch information
Ph0tonic committed Nov 13, 2023
1 parent 861ac13 commit 319ba52
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stores/yaml/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,11 @@ func (store *Store) EmitEncryptedFile(in sops.Tree) ([]byte, error) {
func (store *Store) EmitPlainFile(branches sops.TreeBranches) ([]byte, error) {
var b bytes.Buffer
e := yaml.NewEncoder(io.Writer(&b))
e.SetIndent(store.getIndentation())
indent, err := store.getIndentation()
if err != nil {
return nil, err
}
e.SetIndent(indent)
for _, branch := range branches {
// Document root
var doc = yaml.Node{}
Expand Down

0 comments on commit 319ba52

Please sign in to comment.