Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Add check for installed gh cli #72

Merged
merged 1 commit into from
Aug 9, 2022
Merged

MAINT: Add check for installed gh cli #72

merged 1 commit into from
Aug 9, 2022

Conversation

choldgraf
Copy link
Member

This adds a check for whether the gh cli is installed before trying to use it

@choldgraf
Copy link
Member Author

cc @stefanv I think this would be a more helpful error in case it's not installed, sorry about that!

)
# We can't use this without auth because we hit rate limits immediately
if not auth:
raise ValueError(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very helpful message, thanks!

except FileNotFoundError:
print(
(
"gh cli not found, so will not use it for auth. To download, "
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's the implication here that the user should install gh?
Maybe the auth checks should be printed one by one, to show what's happening under the hood.

Either way, this is an improvement, so 👍

@choldgraf choldgraf changed the title Add check for installed gh cli MAINT: Add check for installed gh cli Aug 9, 2022
@choldgraf choldgraf merged commit 08b6dfb into master Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants