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

Raise meaningful error messages when secret adapter CLIs are not installed #1121

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kylerippey
Copy link

While configuring the 1Password secrets adapter I kept running into a confusing error ("Failed to login to 1Password") despite having followed the documentation and read through some issues threads. I ultimately had to dive into the code to discover that it relies on a CLI that I didn't have installed.

I figured surfacing a meaningful error message when the CLI is missing might save a lot of folks time in the future.

To achieve this I added a check_dependencies! method to all adapters that gets called as the first line in the fetch method. For now each one just checks that the CLI is installed, but it's behavior could be expanded in the future. (For example, after installing the 1Password CLI you also need to configure it. In the future, the 1Password adapter's check_dependencies! method could be expanded to also check that the CLI is configured.)

I'm open to any and all feedback on this. Thanks!

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.

1 participant