Avoid trying to configure tty when non-interactive

Fixes "stty: standard input: Inappropriate ioctl for device"