Equim-chan / mjai-reviewer

🔍🀄️ Review mahjong game log with mjai-compatible mahjong AI.
https://mjai.ekyu.moe
Apache License 2.0
1.03k stars 121 forks source link

Unspecified in-file doesn't open stdin #8

Closed Euophrys closed 4 years ago

Euophrys commented 4 years ago

Running this command: docker run --rm akochan-reviewer:latest --no-open -i - -a 1 -o - > report.html

Results in this error:

src/main.rs:334 parsing tenhou log...
Error: failed to parse tenhou log

Caused by:
    EOF while parsing a value at line 1 column 0

According to the readme, it should read from stdin in this case.

Equim-chan commented 4 years ago

Try using docker run -i ...

--interactive , -i   Keep STDIN open even if not attached

Euophrys commented 4 years ago

That still passes through for me, although it doesn't hit the error:

docker run -i --rm akochan-reviewer:latest --no-open -i - -a 1 -o - > report.html
src/main.rs:334 parsing tenhou log...
Equim-chan commented 4 years ago

This is correct, it is now waiting for stdin for some input.

The line parsing tenhou log... is actually printed before reading anything.