SUP-2138 Refactor config package #243
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This started out to see how we could better manage the configuration for the CLI a little nicer in some sort of hierarchy and ended up quite big. I think where its landed is quite ideal though.
With this change, the configuration follows similar to other Unix configuration files where you have a local config (current directory), a user config (somewhere under $HOME), and potentially down the track a system config (under /etc).
Configuration precedence follows that order as well. So the configuration file "closest" to where
bkis invoked has the highest precedence.This will mean we can remove the LocalConfig object (created another card already).
The file structure was not changed. But access patterns have been improved.
This has also resulted in much less code with more deletions than additions (and that doesn't factor in the followup to remove LocalConfig).