git-mirror icon indicating copy to clipboard operation
git-mirror copied to clipboard

Syntax error causes config parser to go into infinite loop

Open jabl opened this issue 9 years ago • 1 comments

I noticed when I had a config file with [[ Repo ]] instead of [[Repo]] git-mirror just hung and consumed 100% cpu when starting with no message printed to stderr/out. A bit of debugging turned out that the culprit was the toml parser which went into an infinite loop.

Perhaps switch to another toml parser, https://github.com/toml-lang/toml lists several ones for golang.

jabl avatar Feb 26 '16 23:02 jabl

Hi @jabl, thanks for the report, I'll confirm it's coming from the TOML parser and see if we can fix it upstream or look at changing libraries.

beefsack avatar Mar 10 '16 03:03 beefsack