From fe7e6b2a228bb1fb626c929c8292753b7acaf9a1 Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Mon, 30 May 2022 19:49:02 +0200 Subject: [PATCH] fix windows build failing due to syscall --- util/client.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/client.go b/util/client.go index f8abb09..cf9ed88 100644 --- a/util/client.go +++ b/util/client.go @@ -9,7 +9,6 @@ import ( "net/http" "os" "strings" - "syscall" "github.com/passbolt/go-passbolt/api" "github.com/passbolt/go-passbolt/helper" @@ -19,12 +18,11 @@ import ( // ReadPassword reads a Password interactively or via Pipe func ReadPassword() (string, error) { - var fd int + fd := int(os.Stdin.Fd()) var pass []byte - if term.IsTerminal(syscall.Stdin) { + if term.IsTerminal(fd) { fmt.Print("Enter Password:") - fd = syscall.Stdin inputPass, err := term.ReadPassword(fd) if err != nil { return "", err