fix prompt command tty detection for root