Skip to content

Source locations on error are wrong #128

@vgvassilev

Description

@vgvassilev

This is a pretty terrible one I run into. Luckily I came across ruby/psych#190 and solved my issue rather quickly.

Original bug report:

When parsing this yaml

key_one:
  inner:
  - value1
  - value2

key_two:
    inner:
  - value1
  - value2

the error message

Psych::SyntaxError: (/tmp/oops.yaml): did not find expected key while parsing a block mapping at line 1 column 1

contains the wrong line number. It should be reporting line 7 column 5.

I ran into a slightly different problem key: "VAR="OTHER_VAR"" but still the source locations were wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions