Re:Curl doesn’t spew binary anymore
by deathanatos on Saturday June 17, 2017 @04:48PM
(#14577674)
And note that isatty() works on a file descriptor, and that you might be outputting to both stderr and stdout, and both, neither, or some weird combination might be a tty. (i.e., you need to check for the file descriptor you're going to output to.)
Some programs will check if stdout is a tty prior to writing to stderr, for example, which means that if you're doing,
foo | bar
foo's stderr will go to the tty, but would lose coloring, for example.
For example, `babel`, a JS transpiler, loses the color in its error messages when you pipe its output.
Some programs will check if stdout is a tty prior to writing to stderr, for example, which means that if you're doing,
foo's stderr will go to the tty, but would lose coloring, for example. For example, `babel`, a JS transpiler, loses the color in its error messages when you pipe its output.