Skip to content

Commit

Permalink
fix issue with "end of file" (#18)
Browse files Browse the repository at this point in the history
Detailed issue:

can't connect to the PIN entry module '/opt/homebrew/opt/pinentry-touchid/bin/pinentry-touchid': End of file

Reason:

dig into the issue find out when gpg calls out to pinentry-touchi binary, it adds "--display /private/tmp/com.apple.launchd.MGdSfNPjrJ/org.xquartz:0" flag. Because --display is an unrecognized flag for the binary, it errors out immediately. This then result in an unclear message returned from gpg: "No pinentry".

Fix:

adding the dummy --dispaly flag to the flag parser.

Co-authored-by: Huan Wang <[email protected]>
  • Loading branch information
fredwangwang and Huan Wang authored Jan 19, 2022
1 parent 9ae08b5 commit 1d7fbe6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ var (

check = flag.Bool("check", false, "Verify that pinentry-mac is present in the system.")
fixSymlink = flag.Bool("fix", false, "Set up pinentry-mac as the fallback PIN entry program.")
_ = flag.String("display", "", "Set the X display (unused)")
)

// checkEntryInKeychain executes a search in the current keychain. The search configured to not
Expand Down

0 comments on commit 1d7fbe6

Please sign in to comment.