jrsonnet
jrsonnet copied to clipboard
Weird assert: null
I don't know what the assert should look like, but for some reason, it now outputs null instead of a clear error message.
Command:
jrsonnet -e 'local x=1, y=2; assert x == y; {}'
Current output:
assert failed: null
<cmdline>:1:8-32: assertion failure
Expected output:
assert failed: 1 != 2
<cmdline>:1:8-32: assertion failure
Full assert syntax is:
assert condition [ : message ] ; value
If message not specified (assert condition ; value) - it equals to null, this behavior is consistent with other jsonnet implementations.
There is no special parsing rules for assert, there is however std.assertEqual which implements special formatting for equality operation.