Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(secrets): empty secrets values yaml file results in werf error
Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed Dec 14, 2023
1 parent 98e518a commit 7fe6b2b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/secret/yaml_encoder.go
Expand Up @@ -122,9 +122,11 @@ func deepCopyNode(node *yaml_v3.Node) *yaml_v3.Node {
Column: node.Column,
}

copyNode.Content = make([]*yaml_v3.Node, len(node.Content))
for i, child := range node.Content {
copyNode.Content[i] = deepCopyNode(child)
if len(node.Content) > 0 {
copyNode.Content = make([]*yaml_v3.Node, len(node.Content))
for i, child := range node.Content {
copyNode.Content[i] = deepCopyNode(child)
}
}

return copyNode
Expand Down

0 comments on commit 7fe6b2b

Please sign in to comment.