-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
yamlfix breaks yaml loading on strings with question mark #188
Comments
Hi @ginevragaudioso , thanks for taking the time to open the issue. I can confirm the behaviour and that it's a bug that should be fixed. It makes sense to try to fix it upstream first ( |
@ginevragaudioso @lyz-code as a workaround, until this is fixed upstream, you could set the |
Thanks @marcules , that change would work great for us! |
The patch is available since |
I have the following yaml file:
which loads correctly in python with pyyaml's
yaml.safe_load
.yamlfix changes the file to
which cannot be loaded by pyyaml's
yaml.safe_load
, error being "expected ',' or ']', but got '?'"yq breaks similarly with error "parse error: Invalid numeric literal at line 2, column 0"
It would be nice if yamlfix did not remove quotes on strings with question marks (and whatever other set of characters can cause this issue), or if there was a way to disable the feature to remove quotes entirely.
The text was updated successfully, but these errors were encountered: