From 7ba8343b8d0edc1a3de96ee15003b072c7e72627 Mon Sep 17 00:00:00 2001 From: Jack Weldon Date: Fri, 10 Jul 2020 19:51:38 -0400 Subject: [PATCH] fix windows build failure caused by #8431 No longer using the 'syscall' package, as further reading into this issue has shown that 'syscall' is deprecated/locked down. Additional issues posted on Golang's github indicates that the newer preferred mechanism to get the file descriptor for stdin is: int(os.Stdin.Fd()) Signed-off-by: Jack Weldon --- cmd/helm/repo_add.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go index 2fc697ff0..418a549c6 100644 --- a/cmd/helm/repo_add.go +++ b/cmd/helm/repo_add.go @@ -24,7 +24,6 @@ import ( "os" "path/filepath" "strings" - "syscall" "time" "github.com/gofrs/flock" @@ -117,8 +116,9 @@ func (o *repoAddOptions) run(out io.Writer) error { } if o.username != "" && o.password == "" { + fd := int(os.Stdin.Fd()) fmt.Fprint(out, "Password: ") - password, err := terminal.ReadPassword(syscall.Stdin) + password, err := terminal.ReadPassword(fd) fmt.Fprintln(out) if err != nil { return err