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

Nicer error message if missing configuration #66

Merged
merged 2 commits into from
May 24, 2024

Conversation

rubiojr
Copy link
Contributor

@rubiojr rubiojr commented May 3, 2024

Wraps the error to give a bit more context, from this:

❯ gh slack auth
Error: could not find key "extensions"

To:

❯ gh slack auth
Error: failed to read gh-slack configuration: could not find key "extensions"

Wraps the error to give a bit more context, from this:

❯ gh slack auth
Error: could not find key "extensions"

To:

❯ gh slack auth
Error: failed to read gh-slack configuration: could not find key "extensions"
@rneatherway
Copy link
Owner

Oh nice, thanks! Is it also possible to include the path that it tries to load it from?

@rneatherway
Copy link
Owner

I've had a go at that and the error message now reads like:

Error: failed to read gh-slack configuration value "extensions.slack.team" from "/Users/rneatherway/.config/gh/config.yml": could not find key "slack"

What do you think of that?

@rubiojr
Copy link
Contributor Author

rubiojr commented May 24, 2024

Reads great, thanks for taking care of that!

@rneatherway rneatherway merged commit 2d8d997 into rneatherway:main May 24, 2024
2 checks passed
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.

None yet

2 participants