Skip to content

Commit

Permalink
chore: convert syscall.Stdin to int to fix build on Windows (#584)
Browse files Browse the repository at this point in the history
This fixes a bug that was introduced in #582 
Example pipeline in which the bug occured:
https://github.com/hetznercloud/cli/actions/runs/6638017209/job/18033507784#step:4:57
  • Loading branch information
phm07 authored Oct 25, 2023
1 parent 54e582a commit 63ca6de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/cmd/context/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ func runCreate(cli *state.State, _ *cobra.Command, args []string) error {
if token == "" {
for {
fmt.Printf("Token: ")
btoken, err := term.ReadPassword(syscall.Stdin)
// Conversion needed for compilation on Windows
// vvv
btoken, err := term.ReadPassword(int(syscall.Stdin))
fmt.Print("\n")
if err != nil {
return err
Expand Down

0 comments on commit 63ca6de

Please sign in to comment.