Skip to content

Regression in outputting single-quoted strings #2287

Open
@thatch

Description

@thatch

Describe the bug

Somewhere between v4.35.2 and v4.45.1, yq outputting yaml started using the wrong number of single quotes (perhaps it thinks these can be simple scalars):

This input is valid yaml, and should be sent through unmodified:

$ echo "''" | yq .
''
$ echo "''''" | yq .
''''

What it does currently:

$ echo "''" | yq .

$ echo "''''" | yq .
'

Version of yq: v4.45.1
Operating system: Mac and Archlinux
Installed via: homebrew and https://archlinux.org/packages/extra/x86_64/go-yq/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions