On the command line relying on the isTTY flag being set works fine but this technique fails when the script is called from a subprocess in another script. In this case, the process.stdin.isTTY is undefined.
An example situation is found in test scripts, where the input is not piped into the CLI yet because isTTY is undefined, it behaves as if data is piped in.
As such the --pipe option was added to manually tell the script when to look for piped data. Ideally, it can be automatic.
This needs to be investigated further.
On the command line relying on the
isTTYflag being set works fine but this technique fails when the script is called from a subprocess in another script. In this case, theprocess.stdin.isTTYis undefined.An example situation is found in test scripts, where the input is not piped into the CLI yet because isTTY is undefined, it behaves as if data is piped in.
As such the
--pipeoption was added to manually tell the script when to look for piped data. Ideally, it can be automatic.This needs to be investigated further.