Skip to content

Commit e82f158

Browse files
Christian Schürer-WaldheimChristian Schürer-Waldheim
Christian Schürer-Waldheim
authored and
Christian Schürer-Waldheim
committed
Fix compile errors on Windows
1 parent 8ef6438 commit e82f158

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

input/prompt.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,21 @@ loop:
9191

9292
// PromptPassword is a specialized text input that doesn't display the characters entered.
9393
func PromptPassword(prompt, name string, validators ...PromptValidator) (string, error) {
94-
termState, err := terminal.GetState(syscall.Stdin)
94+
termState, err := terminal.GetState(int(syscall.Stdin))
9595
if err != nil {
9696
return "", err
9797
}
9898

9999
cancel := interrupt.RegisterCleaner(func() error {
100-
return terminal.Restore(syscall.Stdin, termState)
100+
return terminal.Restore(int(syscall.Stdin), termState)
101101
})
102102
defer cancel()
103103

104104
loop:
105105
for {
106106
_, _ = fmt.Fprintf(os.Stderr, "%s: ", prompt)
107107

108-
bytePassword, err := terminal.ReadPassword(syscall.Stdin)
108+
bytePassword, err := terminal.ReadPassword(int(syscall.Stdin))
109109
// new line for coherent formatting, ReadPassword clip the normal new line
110110
// entered by the user
111111
fmt.Println()

0 commit comments

Comments
 (0)