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
When specifying --output, strings are de-quoted in some formats and remain quoted in others. This inconsistency between output formats seems like a bug.
Note that any how to questions should be posted in the discussion board and not raised as an issue.
Version of yq: v4.43.1
Operating system: Mac
Installed via: Homebrew
Describe the bug
Somewhat related to #914
When specifying
--output
, strings are de-quoted in some formats and remain quoted in others. This inconsistency between output formats seems like a bug.Note that any how to questions should be posted in the discussion board and not raised as an issue.
Version of yq: v4.43.1
Operating system: Mac
Installed via: Homebrew
Input Yaml
quoted.yml
:unquoted.yml:
Command
The command you ran:
$ yq -o=$FORMAT quoted.yaml
Actual behavior
$ yq -o=yaml quoted.yaml key: "Off" $ yq -o=props quoted.yaml key = Off
Expected behavior
Additional context
Specifically, this causes issues when trying to diff as suggested in tips and tricks for files using YAML 1.1 (i.e. k8s manifests).
The guide suggests using
diff
to compare semantic differences, but because of the inconsistent quoting, this can lead to issues:The text was updated successfully, but these errors were encountered: