You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
right now, the error is not that great when running gh ... being logged out 🤔
and it does not fail in the sense that the LAST_EXIT_CODE is not set to 1 in that case 🤔
an idea that looks to be working: add gh auth status at the start
remaining things: what happens when the user is
logged out: fails with You are not logged into any GitHub hosts. Run gh auth login to authenticate.
right now, the error is not that great when running gh ... being logged out 🤔 and it does not fail in the sense that the LAST_EXIT_CODE is not set to 1 in that case 🤔
Ah, rrrhh so many are not following proper exit codes, your option sound like a good one although the command isn't the fastest (at least when logged)
logged out: fails with You are not logged into any GitHub hosts. Run gh auth login to authenticate.
I would output the same error verbatim, probably prefix with some "Host Error" or something similar
logged in: ??? => --logged-out option to query the API with http get
I'm not familiar with this flow can you elaborate?
related to #19
this PR adds a new `check-gh-logged-in` command to `gh`.
this command checks `gh auth status`, which will return a non-zero exit
code and an error message when not logged in. Then, `check-gh-logged-in`
will return a nice `nushell` unspanned error.
the error is
```
Error:
× You are not logged into any GitHub hosts. Run gh auth login to
│ authenticate.
│
```
otherwise, when already logged in, nothing is shown at all and the
scripts work as expected
> **Note**
> the slow down is quite small and hard to see, i think it's ok to have
such a better error handling 😌
right now, the error is not that great when running
gh ...
being logged out 🤔and it does not fail in the sense that the
LAST_EXIT_CODE
is not set to1
in that case 🤔an idea that looks to be working: add
gh auth status
at the startremaining things: what happens when the user is
You are not logged into any GitHub hosts. Run gh auth login to authenticate.
check-gh-logged-in
before runninggh
#20--logged-out
option to query the API withhttp get
The text was updated successfully, but these errors were encountered: