Skip to content

Commandline parameters override array configuration options from file #1318

Answered by mre
askalski85 asked this question in Q&A
Discussion options

You must be logged in to vote

Heyo @askalski85,

I understand your use-case.

Regarding 1: what if a user wants to indeed completely overwrite a setting through the command line? E.g. what if the --remaps I set on the command line should be the only valid ones? In this case, I would have to remember what the overwrite rules are and which variables get overwritten and which ones don't. 😕 It gets complicated pretty quickly.

Regarding 2:

Environment variable substitution in TOML itself was ruled out in 2014 (toml-lang/toml#255) and again in 2017 (toml-lang/toml#496).

The next option would be the toml crate itself, which we use for parsing the config file.
It is not supported there, either. Probably because it's outside the…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@askalski85
Comment options

Answer selected by askalski85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants