Skip to content

fix: Unchecked error in std.manifestYamlDoc(). #800

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rudo-thomas
Copy link
Contributor

Problem: A recursive call within manifestYamlDoc() might fail but the return value is not checked.

Reproducible with:

$ jsonnet-2f73f61 -e "std.manifestYamlDoc({ x: { y: error 'foo' } }, quote_keys=false)"
"x:\n  "

Expected:

$ jsonnet-0.20.0 -e "std.manifestYamlDoc({ x: { y: error 'foo' } }, quote_keys=false)"
RUNTIME ERROR: foo
	<cmdline>:1:31-42	object <anonymous>
	...

Problem: A recursive call within manifestYamlDoc() might fail but the
return value is not checked.

Reproducible with:
```
$ jsonnet-2f73f61 -e "std.manifestYamlDoc({ x: { y: error 'foo' } }, quote_keys=false)"
"x:\n  "
```

Expected:
```
$ jsonnet-0.20.0 -e "std.manifestYamlDoc({ x: { y: error 'foo' } }, quote_keys=false)"
RUNTIME ERROR: foo
	<cmdline>:1:31-42	object <anonymous>
	...
```
@rudo-thomas
Copy link
Contributor Author

@johnbartholomew, can you please get this merged? :)
Thanks.

@coveralls
Copy link

Coverage Status

coverage: 55.574% (-0.008%) from 55.582%
when pulling b957d71 on rudo-thomas:fix-manifestYamlDoc-error-check
into 2f73f61 on google:master.

@rudo-thomas
Copy link
Contributor Author

Hello, how can I bring someone's attention to this issue? :-)

The fix itself is clear and obvious, but I guess I could add a test for if needed.

Cheers.

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

Successfully merging this pull request may close these issues.

2 participants