go-isatty icon indicating copy to clipboard operation
go-isatty copied to clipboard

IsCygwinTerminal doesn't work on Cygwin

Open Integralist opened this issue 4 years ago • 0 comments

👋🏻

I have the following example, which when run on a Windows 10 VM with Cygwin configured it doesn't actually report anything other than "Is Terminal", when I would expect both that and "Is Cygwin/MSYS2 Terminal" to be displayed.

package main

import (
	"fmt"
	"os"

	"github.com/mattn/go-isatty"
)

func main() {
	if isatty.IsTerminal(os.Stdout.Fd()) {
		fmt.Println("Is Terminal")
	}
	if isatty.IsCygwinTerminal(os.Stdout.Fd()) {
		fmt.Println("Is Cygwin/MSYS2 Terminal")
	}
}

Let me know if you need any more information.

Thanks!

Integralist avatar Nov 08 '21 19:11 Integralist