Skip to content

yamlfix breaks volumes: ["/a:/b"] by removing the quoting, making the list item a mapping #283

Open
@lalten

Description

@lalten

Description

yamlfix breaks volumes: ["/a:/b"] by removing the quoting, making the list item a mapping.

See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes

It looks like this is a ruyaml bug as this happens in

self.yaml.dump(source_dict, string_stream)

Steps to reproduce

❯ yamlfix - <<<'volumes: ["/a:/b"]'
[+] YamlFix: Fixing files
[+] Fixed <stdin>
---
volumes: [/a:/b]

Current behavior

yamlfix breaks volumes: ["/a:/b"] by removing the quoting, making the list item a mapping.

Desired behavior

Don't break the yaml on formatting

Environment

yamlfix: 1.16.0
Python: 3.10.12
Platform: Linux-6.5.0-1018-oem-x86_64-with-glibc2.35

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions