Wow! That was a speedy reply 10x a lot guys. What parser is actually used by circleci? I thought I’ve seen Clojure errors so I assumed it was that, but I guess its probably just a Java lib.
This does seem as correctly meeting YAML 1.0 specification. Not a bug.
Notice the indents:
test: >
foo
--bar
--buzz
— gives { "test": "foo --bar --buzz\n" } as expected, but
test: >
foo
--bar
--buzz
— gives { "test": "foo\n --bar\n --buzz\n" }.
This is correct on the grounds of 4.6.6.1, emphasis mine:
The combined effect of the processing rules above is that each “paragraph” is interpreted as a single line, empty lines are used to represent a line feed, and “more indented” lines are preserved.
Also see Example 4.24 where the spec gives understandable motivation behind this:
indented text: >
This is a folded paragraph
followed by a list:
* first entry
* second entry
Followed by [...]
above is equal to: |
This is a folded paragraph followed by a list:
* first entry
* second entry
Followed by [...]
TL;DR you must not indent subsequent lines in a folded block scalar. This would work as you expect: