-
Notifications
You must be signed in to change notification settings - Fork 43
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
Fall back to $XDG_CONFIG_PATH/minder/config.yaml
when reading configuration
#3645
Conversation
…guration This allows us to have a predictable configuration file when reading the client minder configuration. The idea is that we could set up `$XDG_CONFIG_PATH/minder/config.yaml` and that would serve as an entrypoint. In the future, we could modify this if we want to dynamically change the current working project. Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
$HOME/.minder.yaml
when reading configuration$XDG_CONFIG_PATH/minder/config.yaml
when reading configuration
@@ -73,7 +74,7 @@ Configuration options include: | |||
- identity.cli.issuer_url | |||
- identity.cli.client_id | |||
|
|||
By default, we look for the file as $PWD/config.yaml. You can specify a custom path via the --config flag, or by setting the MINDER_CONFIG environment variable.`, | |||
By default, we look for the file as $PWD/config.yaml and $XDG_CONFIG_PATH/minder/config.yaml. You can specify a custom path via the --config flag, or by setting the MINDER_CONFIG environment variable.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this work if both are present? Is it that one gets a preference over the other or it's something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one gets preference. First $PWD/config.yaml
, then the other one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I was afraid we can accidentally get in a state of conflict if there are two config files present 👍
Summary
This allows us to have a predictable configuration file when reading the
client minder configuration. The idea is that we could set up
$XDG_CONFIG_PATH/minder/config.yaml
and that would serve as an entrypoint.In the future, we could modify this if we want to dynamically change
the current working project.
Change Type
Mark the type of change your PR introduces:
Testing
Review Checklist: