Skip to content
Permalink
Browse files

tasklog: detect Cygwin-style pipe TTYs as TTYs as well

Some Unix emulation layers for Windows, such as Cygwin and MSYS, use
pipes to create their Unix-style TTYs. These TTYs are not detected as
such by Windows, which sees them as pipes. However, our isatty module
has a way to detect them, and they will function just like a TTY for our
purposes, so check for them as well and handle them as TTYs if present.
  • Loading branch information...
bk2204 committed Mar 27, 2019
1 parent f244fa9 commit 705f4f032596887ac7a306e235ee1772aeb779ea
Showing with 1 addition and 1 deletion.
  1. +1 −1 tasklog/log.go
@@ -98,7 +98,7 @@ type hasFd interface {
// tty returns true if the writer is connected to a tty
func tty(writer io.Writer) bool {
if v, ok := writer.(hasFd); ok {
return isatty.IsTerminal(v.Fd())
return isatty.IsTerminal(v.Fd()) || isatty.IsCygwinTerminal(v.Fd())
}
return false
}

0 comments on commit 705f4f0

Please sign in to comment.
You can’t perform that action at this time.