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

handle bad config file values for the root cmd #8

Open
jacobweinstock opened this issue May 7, 2021 · 0 comments
Open

handle bad config file values for the root cmd #8

jacobweinstock opened this issue May 7, 2021 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@jacobweinstock
Copy link
Owner

For the root config options, if a key is specified in the config file that is not specified in the code's config we ignore it. This allows subcommands the ability to specify config file options. One of the side effects is that a bad config file key name will not be caught and if the user isn't notified somehow then it could potentially cause issues, with things like connections, that would be difficult to troubleshoot.
for example:

TLS: http://localhost:42114/cert

instead of

tls: http://localhost:42114/cert

This example would start the tinklet with tls: false, which is not what the user intended. Currently, there would be no notification to the end-user that this config file value was not used.

Possible solutions:

  • update the tls config file key to be more single purpose. so make separate keys for true/false, HTTP location, and file location.
  • add some validation to the root command to catch situations like this
  • investigate the ff library more for a possible solution
@jacobweinstock jacobweinstock added enhancement New feature or request question Further information is requested labels May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant