Skip to content

Commit 3cb7d54

Browse files
Windows: Absorb the difference of syscall.Stdin (#529)
Have to cast syscall.Stdin to int on Windows because Stdin is not simple 0 but Handle (uintptr) there according to the following Godoc. https://pkg.go.dev/syscall?GOOS=windows#pkg-variables Fixes #528
1 parent 0291bc9 commit 3cb7d54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/ecctl/read_secret.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var (
3535
// descriptor. If passFunc is empty, it defaults to terminal.
3636
func ReadSecret(w io.Writer, passFunc PassFunc, msg string) ([]byte, error) {
3737
fmt.Fprint(w, msg)
38-
b, err := passFunc(syscall.Stdin)
38+
b, err := passFunc(int(syscall.Stdin))
3939
fmt.Fprintln(w)
4040
if err != nil {
4141
return nil, err

0 commit comments

Comments
 (0)