-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dog strips colors of task output #112
Comments
@victorbjelkholm sorry for replying so late. I can reproduce the error building your project but I can't reproduce it if I create a bash based dog task that prints text color escape sequences, in that case it works just fine. I see you are using fatih's color package, I will try to reproduce it using it and hopefully fix it. |
Most terminal coloring libraries (and probably fatih's, too) don't output escapes when their output is piped to something that is not a TTY; they usually rely on |
@slapresta you are right,
@victorbjelkholm I'm closing this issue. |
Sorry, I didn't express myself clearly. I didn't mean that this wasn't an issue, I was just explaining what its cause could be. I believe that Dog should proxy this transparently; that is, the applications Dog invokes should transparently know if they're writing to a TTY. The easiest way to do this is probably to pass os.Stdout as their Stdout when invoking them. |
When using dog to run commands that prints out lines with colors, it seems like dog is stripping out the colors for some reason.
I have a project called Quickwiki that uses dog, and when running
QUICKWIKI_DEBUG=1 go run main.go build ./wiki
, it prints out colors.But, when running
QUICKWIKI_DEBUG=1 dog build-wiki
, which runs the same command, the colors are stripped.The text was updated successfully, but these errors were encountered: