From 135a2d636a0660d13b0597e2cdef03f54eb6540e Mon Sep 17 00:00:00 2001 From: Marco Vito Moscaritolo Date: Tue, 29 Jan 2019 08:44:12 +0100 Subject: [PATCH] fix build on windows architecture --- pkg/clustermanager/ssh_communicator.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/clustermanager/ssh_communicator.go b/pkg/clustermanager/ssh_communicator.go index bc3e0f74..08bc9622 100644 --- a/pkg/clustermanager/ssh_communicator.go +++ b/pkg/clustermanager/ssh_communicator.go @@ -10,7 +10,6 @@ import ( "os" "path" "strings" - "syscall" "time" "golang.org/x/crypto/ssh" @@ -228,7 +227,10 @@ func (sshComm *SSHCommunicator) CapturePassphrase(sshKeyName string) error { } fmt.Print("Enter passphrase for SSH key " + privateKey.PrivateKeyPath + ": ") - text, err := terminal.ReadPassword(syscall.Stdin) + // Should be syscall.Stdin but on window architecture the build fail since is + // not an integer value. Casting the syscall.Stdin to int complain on unrequired + // casting on most of the architecture we support. + text, err := terminal.ReadPassword(0) if err != nil { return err