Handle tty for upgrading gems