Deal with no-tty environment for pipe.