From 236c112e3df451598f05378a89986cec8654bf80 Mon Sep 17 00:00:00 2001 From: Morgan Date: Thu, 31 Aug 2023 19:05:06 +0200 Subject: [PATCH] fix(pkg/commands): readPassword support for windows (#1089) fixes #1060 (maybe). @ekleiner to verify :) --- tm2/pkg/commands/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tm2/pkg/commands/utils.go b/tm2/pkg/commands/utils.go index c7f85bdadce..c7ce19e8138 100644 --- a/tm2/pkg/commands/utils.go +++ b/tm2/pkg/commands/utils.go @@ -2,8 +2,8 @@ package commands import ( "errors" + "os" "strings" - "syscall" "golang.org/x/term" ) @@ -39,7 +39,7 @@ func (io *IO) readLine() (string, error) { // readPassword reads the password from a terminal // without local echo func readPassword() (string, error) { - fd := syscall.Stdin + fd := int(os.Stdin.Fd()) inputPass, err := term.ReadPassword(fd) if err != nil {