gh reports my current user incorrectly when called from a folder that is a git repo (I think that's what is triggering it?).
$ gh user --whoami
First we need authorization to use GitHub's API. Login with your GitHub account.
? Enter your GitHub user bpatram
? Enter your GitHub password [hidden]
? Enter your two-factor code 851335
Writing GH config data: /Users/brandonpatram/.gh.json
Authentication succeed.
ebth
# Calling this from a repo
$ gh user --whoami
ebth
# Moving to a directory that is not a git repo
$ cd ~
$ gh user --whoami
bpatram
In my case, it seems to return the organization the repo is owned by (ebth). Interestingly enough my .gh.json does list the correct user.
"github_user": "bpatram",
Deleting the .gh.json file and relogging has no effect.