After #672
I looked into it more, and while I didn't find the exact issue, the py-yajl binding we're using for JSON isn't great. It needs to use a more straightforward loop like the example here.
https://lloyd.github.io/yajl/
$ bin/osh -c 'json read :x < configure'
lexical error: invalid char in json text.
#!/bin/sh # # POSIX shell scrip
(right here) ------^
json read :x < configure
^~~~
[ -c flag ]:1: json read: parse error
Error closing descriptor 0: [Errno 9] Bad file descriptor
osh I/O error: Bad file descriptor
Though it doesn't look like the binding closes the file descriptor, which would be the obvious bug
After #672
I looked into it more, and while I didn't find the exact issue, the py-yajl binding we're using for JSON isn't great. It needs to use a more straightforward loop like the example here.
https://lloyd.github.io/yajl/
Though it doesn't look like the binding closes the file descriptor, which would be the obvious bug