Config resolved twice, resulting in not picking up MD fragment template
brettcannon opened this issue · 3 comments
With the following config in changelog.d/scriv.ini
:
[tool.scriv]
format = md
I end up with fragments from the rst template. If I drop the following line:
Line 177 in 2e35bb9
the issue goes away. It turns out that Config.resolve_all()
is called twice: once with no settings read from the config file and again after reading the config. It looks like the first call sets config.new_fragment_template
to the actual template and then subsequent resolve_all()
don't update it since the file: new_fragment.${config:format}.j2
string has been replaced already.
This also affects the output file. I am working around it by explicitly specifying the settings that try to use format
implicitly:
new_fragment_template = file: new_fragment.md.j2
output_file = CHANGELOG.md
This is now available in version 0.12.0