Detect tty and don't pass -it