aboutsummaryrefslogtreecommitdiff
path: root/cmd/create-account/main.go
diff options
context:
space:
mode:
authorS7evinK <tfaelligen@gmail.com>2021-11-02 17:50:59 +0100
committerGitHub <noreply@github.com>2021-11-02 16:50:59 +0000
commit0c2872828b7b8aa06a9c6be2c7a5ac0ce119fb6b (patch)
tree90861b961efcd1758c2ff84785ee96173a936827 /cmd/create-account/main.go
parentdec05c334707346506a979e1cdb3b295dbad5c4f (diff)
Fix building on Windows (#2008)
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
Diffstat (limited to 'cmd/create-account/main.go')
-rw-r--r--cmd/create-account/main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/create-account/main.go b/cmd/create-account/main.go
index a1e254f8..3ac07770 100644
--- a/cmd/create-account/main.go
+++ b/cmd/create-account/main.go
@@ -22,7 +22,6 @@ import (
"io/ioutil"
"os"
"strings"
- "syscall"
"github.com/matrix-org/dendrite/setup"
"github.com/matrix-org/dendrite/setup/config"
@@ -121,13 +120,13 @@ func getPassword(password, pwdFile *string, pwdStdin, askPass *bool, r io.Reader
// ask the user to provide the password
if *askPass {
fmt.Print("Enter Password: ")
- bytePassword, err := term.ReadPassword(syscall.Stdin)
+ bytePassword, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
logrus.Fatalln("Unable to read password:", err)
}
fmt.Println()
fmt.Print("Confirm Password: ")
- bytePassword2, err := term.ReadPassword(syscall.Stdin)
+ bytePassword2, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
logrus.Fatalln("Unable to read password:", err)
}