Trying to run this code on Windows is somewhat nonsensical. As a very basic level, /bin/sh
is not available on Windows, so it would fail there.
Secondly, and more directly to the point of your question: usePTY
uses a PTY
, or pseudo-terminal, a concept which does not exist on Windows. It is very definitely not supported.