Skip to content

Commit 2d9b428

Browse files
authored
Merge pull request #126 from elezar/add-yaml-separator
Prepend yaml separator (---) to yaml output
2 parents fca2154 + f13ffdc commit 2d9b428

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/cdi/spec.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ func (s *Spec) write(overwrite bool) error {
132132

133133
if filepath.Ext(s.path) == ".yaml" {
134134
data, err = yaml.Marshal(s.Spec)
135+
data = append([]byte("---\n"), data...)
135136
} else {
136137
data, err = json.Marshal(s.Spec)
137138
}

0 commit comments

Comments
 (0)