fail early if not connected to a tty