readline: fix behaviour of Interface plugged to a non-terminal output
Fixes: https://github.com/nodejs/node/issues/36773
/cc @addaleax
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
Tests are included -
commit message follows commit guidelines