[fix] Prevent freeze in the cli if it's not running from a tty