Skip to content

Commit 031ceb4

Browse files
committed
yqutil: Use LF for line endings regardless of the platform.
Signed-off-by: Norio Nomura <[email protected]>
1 parent 0822d08 commit 031ceb4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/yqutil/yqutil.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func yamlfmt(content []byte) ([]byte, error) {
8484
factory := basic.BasicFormatterFactory{}
8585
config := map[string]interface{}{
8686
"indentless_arrays": true,
87+
"line_ending": "lf", // prefer LF even on Windows
8788
"pad_line_comments": 2,
8889
"retain_line_breaks": true, // does not affect to the output because yq removes empty lines before formatting
8990
}

0 commit comments

Comments
 (0)