Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persisting Single quote issue #413

Closed
avinashGuptaIos opened this issue Apr 16, 2020 · 1 comment
Closed

Persisting Single quote issue #413

avinashGuptaIos opened this issue Apr 16, 2020 · 1 comment
Labels
Milestone

Comments

@avinashGuptaIos
Copy link

Describe the bug
Want to persist single quote.

Command
The command you ran:

yq n 'boolValue' --tag '!!str' false

Actual behavior

boolValue: "false"

Expected behavior

boolValue: 'false'

Additional context
https://mikefarah.gitbook.io/yq/usage/value-parsing#using-the-tag-field-to-override

Casting booleans
yq new --tag '!!str' key true
results in
key: 'true'

as mentioned it is not working.

@mikefarah
Copy link
Owner

Thanks @avinashGuptaIos, that's a good find, I'll update the docs.

As quote styles seems to a common request, I'm also going to add a 'style' flag that maps roughly to https://godoc.org/gopkg.in/yaml.v3#Style

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants