Fix: global_conf not taking priority #162
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.
Based on the line in the docs:
This logic was backwards. Current functionality searches for the
-conf
path and when one isn't passed (like when using-global_conf
only) it immediately returns and does not search for the global_conf. This causes the config file from the current working directory to be picked up before the global conf does even when the flag is set explicitly.Examples A, C, D are given so that existing & future functionality can be shown to be the same. However Example B is the current and fixed issue.
Functionality comparisons:
Scenario A:
Expected result: Uses local config
Existing Result: Uses local config
New Result: Uses local config
Existing
New
Scenario B:
Expected Result: Uses global config
Existing Result: Uses local config
New Result: Uses global config
Existing
New
Scenario C:
Expected Result: Uses -conf specified file
Existing Result: Uses -conf specified file
New Result:
Existing
New
Scenario D:
Expected Result: -global_conf takes precidence
Current Result: -global_conf takes precidence
New Result: -global_conf takes precidence
Existing
New