git-up
git-up copied to clipboard
control codes are output to non-tty's
In order for git-up to set the terminals color, special codes have to be emitted to stdout. This is fine, as long as stdout is connected to a tty.
If the command is executed from, say, sublime text, the output will be a standard pipe, and sublime will display the control characters as 'weird letters'.
error: Could not fetch origin
[31m`git fetch` failed[0m
A possible solution would be to check whether or not stdout is a tty.
This gist might be of help: https://gist.github.com/timuruski/6072363
I think this should be checked in the colored library.
See defunkt/colored#4.