Closed ghost closed 3 years ago
Just saw the example for this involves using kcr echo
so though I might have been doing it wrong but still get the same error with the example: kcr echo -- echo kanto | kcr echo - echo johto | kcr send -
error:
Unhandled exception: Unexpected char 'k' at line 1, column 1 (JSON::ParseException)
from /usr/share/crystal/src/json/lexer.cr:376:7 in 'raise'
from /usr/share/crystal/src/json/lexer.cr:372:5 in 'unexpected_char'
from /usr/share/crystal/src/json/lexer.cr:371:11 in 'unexpected_char'
from /usr/share/crystal/src/slice.cr:225:5 in 'next_token'
from /usr/share/crystal/src/json/pull_parser.cr:638:11 in 'initialize'
from /usr/share/crystal/src/json/from_json.cr:13:3 in 'add'
from src/cli.cr:430:9 in 'start'
from src/cli.cr:618:1 in '__crystal_main'
from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main'
from __libc_start_main
from _start
from ???
Good catch. I have to restore JSON Lines.
For the time being, you can --slurp
the output with jq.
Added kcr send --lines
.
I am trying to use the command
echo nop | kcr send -
but this fails and outputs the following error:I expect the command to do the same as
kcr send nop