Skip to content

IsTerminal check fails on Windows #2

@dmolesUC

Description

@dmolesUC

Not that I actually need it myself right now, but I was cross-compiling my app for completeness and got this:

# github.com/janeczku/go-spinner
../../Projects/Go/pkg/mod/github.com/janeczku/go-spinner@v0.0.0-20150530144529-cf8ef1d64394/spinner.go:39:25: cannot use syscall.Stdout (type syscall.Handle) as type int in argument to terminal.IsTerminal

Probably the simplest thing is either to assume that Windows is always a TTY, or never a TTY — probably the latter since I'm guessing there will be other issues. An explicit type assertion on syscall.Stdout would probably take care of the compilation error; I can submit a PR if you think that makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions