Open nolith opened 1 year ago
A template with a nested if do not work and renders with an extra {% endif %}
if
{% endif %}
Can this be reproduced with the yadm/testbed docker image: No - I wasn't able to make yadm alt work on the container
yadm alt
Steps to reproduce the behavior:
cat << EOF > test.conf\#\#template {% if yadm.os == "Darwin" %} {% if yadm.arch == "arm64" %} macOS arm64 {% else %} macOS amd64 {% endif %} {% endif %} EOF
yadm add test.conf##template
cat test.conf
macOS arm64 {% endif %}
test.conf should have only included one line macOS arm64
test.conf
macOS arm64
[Add any other context about the problem here.]
This is currently working as intended. The built-in template processing is for very simple cases, and does not support nested conditionals. I'll change this issue to be a feature request.
Describe the bug
A template with a nested
if
do not work and renders with an extra{% endif %}
To reproduce
Can this be reproduced with the yadm/testbed docker image: No - I wasn't able to make
yadm alt
work on the containerSteps to reproduce the behavior:
yadm add test.conf##template
yadm alt
cat test.conf
Expected behavior
test.conf
should have only included one linemacOS arm64
Environment
Additional context
[Add any other context about the problem here.]