Benjamin-Loison / matrix-commander

simple but convenient CLI-based Matrix client app for sending and receiving
GNU General Public License v3.0
0 stars 0 forks source link

` printf ... | matrix-commander --event -` does not seem to work fine on docker #2

Open Benjamin-Loison opened 10 months ago

Benjamin-Loison commented 10 months ago

Cf https://codeberg.org/Benjamin_Loison/Webscrap_any_website/issues/5.

Writing the printf result to ~/Desktop/bens_folder/softwares/matrix-commander/data/event.json and executing matrix-commander -e /data/event.json solves the issue. Do not forget to delete this file then.

Finding a workaround not requiring writing to a file would be nice.

-e (--event) documentation:

https://github.com/8go/matrix-commander/blob/79a5d0c2db9b3c49de0d0538affbe07f1a266f84/README.md?plain=1#L1244-L1258

cat event.json | docker run -i -a stdin --rm -v ~/Desktop/bens_folder/softwares/matrix-commander/data:/data:z matrix-commander -e -

Both above commands work fine. However, it does not seem to work as is when modifying /usr/local/bin/matrix-commander. As it holds when not providing a stdin, let us use for the moment a specific matrix-commander_with_stdin. A cleaner workaround would be appreciated.