Skip to content

Commit

Permalink
Change tty detection library
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Aug 23, 2017
1 parent 44ebb0e commit 717bf7f
Show file tree
Hide file tree
Showing 19 changed files with 1,441 additions and 225 deletions.
4 changes: 2 additions & 2 deletions command/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"strings"

"github.com/hashicorp/nomad/api"
isatty "github.com/mattn/go-isatty"
"github.com/mitchellh/cli"
"github.com/mitchellh/colorstring"
"golang.org/x/crypto/ssh/terminal"
)

const (
Expand Down Expand Up @@ -127,7 +127,7 @@ func (m *Meta) Client() (*api.Client, error) {
func (m *Meta) Colorize() *colorstring.Colorize {
return &colorstring.Colorize{
Colors: colorstring.DefaultColors,
Disable: m.noColor || !isatty.IsTerminal(os.Stdout.Fd()),
Disable: m.noColor || !terminal.IsTerminal(int(os.Stdout.Fd())),
Reset: true,
}
}
Expand Down
9 changes: 0 additions & 9 deletions vendor/github.com/mattn/go-isatty/LICENSE

This file was deleted.

50 changes: 0 additions & 50 deletions vendor/github.com/mattn/go-isatty/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions vendor/github.com/mattn/go-isatty/doc.go

This file was deleted.

18 changes: 0 additions & 18 deletions vendor/github.com/mattn/go-isatty/isatty_bsd.go

This file was deleted.

18 changes: 0 additions & 18 deletions vendor/github.com/mattn/go-isatty/isatty_linux.go

This file was deleted.

10 changes: 0 additions & 10 deletions vendor/github.com/mattn/go-isatty/isatty_others.go

This file was deleted.

16 changes: 0 additions & 16 deletions vendor/github.com/mattn/go-isatty/isatty_solaris.go

This file was deleted.

94 changes: 0 additions & 94 deletions vendor/github.com/mattn/go-isatty/isatty_windows.go

This file was deleted.

27 changes: 27 additions & 0 deletions vendor/golang.org/x/crypto/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions vendor/golang.org/x/crypto/PATENTS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 717bf7f

Please sign in to comment.