Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(GUI): multiple JSON objects coming up at once from the IPC client
The GUI executes the CLI and pipes every line of output coming from either `stdout` or `stderr` to the IPC server as "messages." In some scenarios, the child process data handler might receive multiple lines of output at the same time. Since the CLI outputs stringified JSON objects each in a different line, trying to parse two JSON objects separated by a new line causes the parser to crash. As a solution, we split the data coming in by new lines (`\r\n` in Windows), and emit a message for only the last one. Fixes: #898 Changelog-Entry: Fix "Invalid message" error caused by the IPC client emitting multiple JSON objects as a single message. Change-Type: patch Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
- Loading branch information