Kixunil / configure_me

A Rust library for processing application configuration easily
62 stars 14 forks source link

Skipping default config files #37

Closed Kixunil closed 2 years ago

Kixunil commented 4 years ago

It'd be great to add an option to enable skipping default config files. It'd resolve https://github.com/romanz/electrs/issues/217 as well as provide some robustness for other interesting cases. Programs that don't have such options are sometimes painful to work with (pkg-config comes to mind).

Proposed solution: make it possible to add skip_default_configs to a boolean flag. After processing arguments, this is checked and configs are not loaded if it's set to true.

Pros:

Cons:

Alternatives:

Kixunil commented 4 years ago

Adding "bug" label because the inability to turn off default configs can be highly problematic in certain situations. I'm going ahead and implement this unless someone raises important objection.