Closed klaernie closed 1 year ago
@sni Would you consider adding a --test-config
to test the config file and exit accordingly?
well, usually the lmd.ini is pretty static not not changed all the time, but why not...
Well, I'm just asking to protect from stupid - with me being the usually stupid one ;)
I spent yesterday trying to figure out why lmd was not starting up. It took quite some hours to realize, that the config format is not ini, but toml - and toml requires quoting strings always. (my inner monk now needs to rename the config to
lmd-local.toml
)The confusing part is, that I tried to run the binary (
./lmd -c repro.ini
) and it did not print any error message, just silently exited. My next step was checking strace, and I could see that it exited just after reading the config file. Without any error message to guide I the scope was way too big and I started looking through the code to understand where it could haveexit(2)
, but didn't find anything. I read over the config reading part a couple times, and only hours later it popped into my head, that there was no true ini-reader, but a toml-reader. So I read the wikipedia page and it mentioned the need to quote every string.Here is a small reproduction:
Now I'd have some small wishes:
Thanks and best regards, Andre