diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-26 10:07:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 10:07:57 +0100 |
commit | 416916220a9be0e8e30dd999033637ccca3b410b (patch) | |
tree | 025237d6a0326571fbfa4e1ca500b0282959d9e0 /input/prompt.go | |
parent | 0c791483286ce2ed845bbc77b2a2899149ad83c5 (diff) | |
parent | e82f1588598e8a99cbdef2a1e5d98c0c16d3d17e (diff) | |
download | git-bug-416916220a9be0e8e30dd999033637ccca3b410b.tar.gz |
Merge pull request #346 from quincunx/fix_compile_error
Fix compile errors on Windows
Diffstat (limited to 'input/prompt.go')
-rw-r--r-- | input/prompt.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/input/prompt.go b/input/prompt.go index 80f5a614..576d45bb 100644 --- a/input/prompt.go +++ b/input/prompt.go @@ -91,13 +91,13 @@ loop: // PromptPassword is a specialized text input that doesn't display the characters entered. func PromptPassword(prompt, name string, validators ...PromptValidator) (string, error) { - termState, err := terminal.GetState(syscall.Stdin) + termState, err := terminal.GetState(int(syscall.Stdin)) if err != nil { return "", err } cancel := interrupt.RegisterCleaner(func() error { - return terminal.Restore(syscall.Stdin, termState) + return terminal.Restore(int(syscall.Stdin), termState) }) defer cancel() @@ -105,7 +105,7 @@ loop: for { _, _ = fmt.Fprintf(os.Stderr, "%s: ", prompt) - bytePassword, err := terminal.ReadPassword(syscall.Stdin) + bytePassword, err := terminal.ReadPassword(int(syscall.Stdin)) // new line for coherent formatting, ReadPassword clip the normal new line // entered by the user fmt.Println() |