therubymug/hitch — Issue #8: STDOUT.tty? breaks pipes
Author: jimmycuadra
Created: 2012-02-21 23:09:10+00:00
State: open

While writing a function to add Hitch info to my bash prompt, I was piping the output of `hitch` to `cut`, and wasn't getting any output. At first I thought I was doing something wrong in bash, but ultimately I discovered that `Hitch.print_info` is explicitly checking if `STDOUT` is a terminal and not outputting anything in that case. This prevents UNIX pipes from passing along the output of the command. Is there a reason this check is being made? Can it just be removed?