Skip to content

Commit 4d620bf

Browse files
mikefarahccoVeille
andauthored
Update pkg/yqlib/encoder_toml.go
Co-authored-by: ccoVeille <[email protected]>
1 parent b8d90fd commit 4d620bf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/yqlib/encoder_toml.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ func (te *tomlEncoder) Encode(writer io.Writer, node *CandidateNode) error {
3434
// Encode to a buffer first if colors are enabled
3535
var buf bytes.Buffer
3636
var targetWriter io.Writer
37+
targetWriter = writer
3738
if te.prefs.ColorsEnabled {
3839
targetWriter = &buf
39-
} else {
40-
targetWriter = writer
4140
}
4241

4342
// Encode a root mapping as a sequence of attributes, tables, and arrays of tables

0 commit comments

Comments
 (0)