private function isTtyTerminal(StreamOutput $output)
    {
        $tty = function_exists('posix_isatty') && @posix_isatty($output->getStream());
        if ($tty) {
            putenv("PERIDOT_TTY=1");
        }
        return $tty;
    }