Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWright committed Feb 20, 2025
1 parent 32e187f commit 088c214
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions internal/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ func run(o runOpts) ([]byte, error) {
return nil, fmt.Errorf("failed to get output writer: %w", err)
}

writer = parsing.MultiDocumentWriter(writer)

opts = append(opts, variableOptions(o.Vars)...)

// Default to null. If stdin is being read then this will be overwritten.
Expand Down
6 changes: 5 additions & 1 deletion parsing/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ func (f Format) NewWriter(options WriterOptions) (Writer, error) {
if !ok {
return nil, fmt.Errorf("unsupported writer file format: %s", f)
}
return fn(options)
w, err := fn(options)
if err != nil {
return nil, err
}
return MultiDocumentWriter(w), nil
}

// String returns the string representation of the format.
Expand Down

0 comments on commit 088c214

Please sign in to comment.