fix(templates): render the documented function value in shell rc files
The template read `function.body`, while README and defaults/main.yaml document the key as `functions[].value`. Every documented example therefore rendered an empty function body, and with a strict undefined policy the template failed outright. The documentation is the contract for this role, so the template follows it instead of the other way around. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
{% if shell_rc_file.functions is defined %}
|
{% if shell_rc_file.functions is defined %}
|
||||||
{% for function in shell_rc_file.functions %}
|
{% for function in shell_rc_file.functions %}
|
||||||
function {{ function.name }} {
|
function {{ function.name }} {
|
||||||
{{ function.body | indent(2, True) }}
|
{{ function.value | indent(2, True) }}
|
||||||
}
|
}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user