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

kbs2: Use KBS2_CONFIG_DIR as a default config dir value #61

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

woodruffw
Copy link
Owner

This establishes the following precedence:

  • --config-dir DIR
  • KBS2_CONFIG_DIR
  • The default, i.e. ~/.config/kbs2

This has the nice consequence of ensuring that custom subcommands use the right configuration directory when invoking kbs2 on their own without requiring them to do something ugly like:

$ kbs2 -c "${KBS2_CONFIG_DIR}" whatever -a -b -c

Hooks are not guaranteed to receive KBS2_CONFIG_DIR in their environment. This probably needs to be fixed and will require a more involved change (since a Config doesn't know the directory that produced it).

@woodruffw woodruffw self-assigned this Jun 24, 2020
@woodruffw woodruffw merged commit 17a0db0 into master Jun 24, 2020
@woodruffw woodruffw deleted the config-dir-env-default branch June 24, 2020 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant