Allow setting both SPLUNK_CONFIG and --config with priority given to --config #450
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.
Currently it's forbidden to set both
SPLUNK_CONFIG
and provide the--config
cmdline options for our distribution. This is a little unexpected given cli tools generally allow redundant options while giving priority to command line options and falling back to environment variables. The current system makes it relatively inconvenient to update startup arguments as changing or clearing the environment variable is also required, which can sometimes be more difficult than updating the cmdline args.These changes ease the restriction and give priority to the
--config
option with clear logging of which config will be used. They also provide more context when default config locations are used and required env vars aren't set.Also including necessary testutils changes for added integration tests.