Skip to content

Commit

Permalink
Fix building for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
majd committed Dec 5, 2022
1 parent 99c1bf1 commit f77b0d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Dry Builds
name: Dry Build

on:
pull_request:
branches:
- main

jobs:
build:
name: Build
build_ios:
name: Dry build (iOS)
runs-on: macos-12
Expand Down
3 changes: 1 addition & 2 deletions cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"os"
"path/filepath"
"strings"
"syscall"
)

func newCookieJar() (*cookiejar.Jar, error) {
Expand Down Expand Up @@ -70,7 +69,7 @@ func newKeyring(logger log.Logger, passphrase string, interactive bool) (keyring

path := strings.Split(s, " unlock ")[1]
logger.Log().Msgf("enter passphrase to unlock %s (this is separate from your Apple ID password): ", path)
password, err := term.ReadPassword(syscall.Stdin)
password, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
return "", errors.Wrap(err, "failed to read password")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/appstore/appstore_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/majd/ipatool/pkg/http"
"github.com/majd/ipatool/pkg/util"
"github.com/pkg/errors"
"os"
"strings"
"syscall"
)

type LoginAddressResult struct {
Expand Down Expand Up @@ -185,7 +185,7 @@ func (*appstore) authDomain(authCode, guid string) string {
}

func (a *appstore) promptForPassword() (string, error) {
password, err := a.machine.ReadPassword(syscall.Stdin)
password, err := a.machine.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
return "", errors.Wrap(err, ErrGetData.Error())
}
Expand Down

0 comments on commit f77b0d9

Please sign in to comment.