Skip to content

Spurious comment line duplication in yq v4.50.1 #2578

@andry81

Description

@andry81

May be related to: #2572

test.yml:

# This file is automatically generated by ...
#

content-index:

  timestamp: "2026-01-16T00:00:00Z"

Test:

yq.exe e ".\"content-index\".timestamp=\"123\"" test.yml > test2.yml

Tested versions: 4.50.1, 4.49.2 (amd64)

4.49.2:

# This file is automatically generated by ...
#
content-index:
  timestamp: "123"

4.50.1:

# This file is automatically generated by ...
#
# 
content-index:
  timestamp: "123"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions