There really is no way unless you run it from a (pseudo) terminal. It checks the file descriptors 0 1 for isatty and sets batch mode if at least one of them is not a terminal. On the other hand, you can force batch mode.
In any case, this makes sense, because readline, which is used for the request, requires that the terminal work with a sufficient degree of reliability. Therefore, the correct way to fix this is to run it in a pseudo-terminal.
source share