#1087·fq

FQ fails to parse YAML files containing multiple documents

Author: visualphoenixCreated Feb 27, 2025Updated Feb 28, 2025

What version are you using (fq -v)?


$ fq -v
0.13.0 (darwin arm64 go1.23.5)

How was fq installed?

FQ was installed with Nix on macOS.

Can you reproduce the problem using the latest release or master branch?

I have verified that this issue occurs in version 0.13.0. I haven't checked the master branch, but I can try if needed.

What did you do?

I attempted to parse a YAML file containing multiple documents using fq.

To demonstrate:

$ cat b
---
hi: bye
---
doesnt: work

$ cat b | fq .

What result did you expect?

I expected fq to parse the YAML file and output each document separately as a stream or in an array format, similar to how it handles a single document.

What did you see instead?

error: <stdin>: probe: failed to decode: try fq -d FORMAT to force format, see fq -h formats for list