Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Use cross-platform dependencies in place of golang.org/x/crypto/ssh/terminal #25

Merged
merged 1 commit into from
Jan 5, 2016

Conversation

jen20
Copy link
Contributor

@jen20 jen20 commented Dec 30, 2015

Functions in golang.org/x/crypto/ssh/terminal (in particular terminal.IsTerminal(int) and ReadPassword(string) on the Terminal struct which are used in the CLI user interface) are coded directly against system calls, and do not compile on Solaris-derived Unix systems - notably SmartOS.

This commit replaces calls to terminal.IsTerminal with the go-isatty package, which is cross platform, and calls to ReadPassword with the go-speakeasy package in order to be compatible with SmartOS.

This does not affect the public API of the CLI package.

Functions in golang.org/x/crypto/ssh/terminal (in particular
terminal.IsTerminal(int) and ReadPassword(string) on the Terminal struct
which are used in the CLI user interface) are coded directly against
system calls, and do not compile on Solaris-derived Unix systems -
notably SmartOS.

This commit replaces calls to terminal.IsTerminal with the go-isatty
package, which is cross platform, and calls to ReadPassword with the
go-speakeasy package in order to be compatible with SmartOS.
@phinze
Copy link
Contributor

phinze commented Jan 4, 2016

LGTM

@mitchellh
Copy link
Owner

Thanks!

mitchellh added a commit that referenced this pull request Jan 5, 2016
Use cross-platform dependencies in place of golang.org/x/crypto/ssh/terminal
@mitchellh mitchellh merged commit 43a4bc3 into mitchellh:master Jan 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants