Merge pull request #8432 from jrweldon/fix/windows-build-failure

fix windows build failure caused by #8431
pull/8437/head
Matthew Fisher 4 years ago committed by GitHub
commit 7dd42d7c06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,7 +24,6 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
"syscall"
"time" "time"
"github.com/gofrs/flock" "github.com/gofrs/flock"
@ -117,8 +116,9 @@ func (o *repoAddOptions) run(out io.Writer) error {
} }
if o.username != "" && o.password == "" { if o.username != "" && o.password == "" {
fd := int(os.Stdin.Fd())
fmt.Fprint(out, "Password: ") fmt.Fprint(out, "Password: ")
password, err := terminal.ReadPassword(syscall.Stdin) password, err := terminal.ReadPassword(fd)
fmt.Fprintln(out) fmt.Fprintln(out)
if err != nil { if err != nil {
return err return err

Loading…
Cancel
Save