Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsCygwinTerminal doesn't work on Cygwin #70

Open
Integralist opened this issue Nov 8, 2021 · 0 comments
Open

IsCygwinTerminal doesn't work on Cygwin #70

Integralist opened this issue Nov 8, 2021 · 0 comments

Comments

@Integralist
Copy link

Integralist commented Nov 8, 2021

馃憢馃徎

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant