You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks more like what I would have expected in the first example, though the leading newline has been lost. But it seems broken that the output from the first yq is different from the second, even though the second is doing nothing more than echoing it.
I can get the same result using an input file (called test.yaml) that looks like this:
Version 4.44.5
Command:
echo '{"a": "\nb\nc"}' | yq -p json '.'
Output:
Strange looking scalar (
2-
) ... I would have expected|-
or I guess even|2-
. I didn't know this was valid syntax. Maybe it isn't?Anyway, if I continue this example:
Command:
echo '{"a": "\nb\nc"}' | yq -p json '.' | yq '.'
Output:
Looks more like what I would have expected in the first example, though the leading newline has been lost. But it seems broken that the output from the first
yq
is different from the second, even though the second is doing nothing more than echoing it.I can get the same result using an input file (called
test.yaml
) that looks like this:Command:
cat test.yaml | yq -o json '.'
Output:
Command:
cat test.yaml | yq -o json '.' | yq -p json '.'
Output:
Command:
cat test.yaml | yq -o json '.' | yq -p json '.' | yq '.'
Output:
The text was updated successfully, but these errors were encountered: