Skip to content

Commit f13ffdc

Browse files
committed
Prepend yaml separator (---) to yaml output
Signed-off-by: Evan Lezar <[email protected]>
1 parent e66e1b9 commit f13ffdc

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)