I had some issues with initial auth token setup (I think probably due to an old ghub as per #5), which resulted in the token being created on GitHub but not correctly set up locally (I guess in .authinfo). When I tried to step through again, I think I found a bug in the code which tries to warn the user that there is already an auth token on GitHub of the same name. The problem seems to be in this part of ghub--confirm-create-token:
I had some issues with initial auth token setup (I think probably due to an old ghub as per #5), which resulted in the token being created on GitHub but not correctly set up locally (I guess in
.authinfo
). When I tried to step through again, I think I found a bug in the code which tries to warn the user that there is already an auth token on GitHub of the same name. The problem seems to be in this part ofghub--confirm-create-token
:I stepped through with
edebug
and saw this asghub--create-token-error
:So the first problem is that
(nth 3 ghub--create-token-error)
evaluates to"/authorizations"
not the payload.Secondly,
.errors
returns a list of errors, not a single error, so you can't use.code
on it directly; instead you need another nested let-alist.I'll submit a PR with a fix.
Here's the full stacktrace for reference: