diff --git a/validator/accounts/account.go b/validator/accounts/account.go index 9b93aaa83..6a797ca1b 100644 --- a/validator/accounts/account.go +++ b/validator/accounts/account.go @@ -7,7 +7,6 @@ import ( "io" "os" "strings" - "syscall" "github.com/pkg/errors" contract "github.com/prysmaticlabs/prysm/contracts/deposit-contract" @@ -136,7 +135,7 @@ func CreateValidatorAccount(path string, passphrase string) (string, string, err reader := bufio.NewReader(os.Stdin) log.Info("Create a new validator account for eth2") log.Info("Enter a password:") - bytePassword, err := terminal.ReadPassword(syscall.Stdin) + bytePassword, err := terminal.ReadPassword(int(os.Stdin.Fd())) if err != nil { log.Fatalf("Could not read account password: %v", err) } diff --git a/validator/keymanager/direct_keystore.go b/validator/keymanager/direct_keystore.go index 6b398f945..cd9a67cbe 100644 --- a/validator/keymanager/direct_keystore.go +++ b/validator/keymanager/direct_keystore.go @@ -7,7 +7,6 @@ import ( "path/filepath" "runtime" "strings" - "syscall" "github.com/prysmaticlabs/prysm/shared/bls" "github.com/prysmaticlabs/prysm/shared/bytesutil" @@ -63,7 +62,7 @@ func NewKeystore(input string) (KeyManager, string, error) { } else { if opts.Passphrase == "" { log.Info("Enter your validator account password:") - bytePassword, err := terminal.ReadPassword(syscall.Stdin) + bytePassword, err := terminal.ReadPassword(int(os.Stdin.Fd())) if err != nil { return nil, keystoreOptsHelp, err }