mirror of
https://github.com/saltstack-formulas/template-formula.git
synced 2025-04-17 10:10:28 +00:00
fix(libtofs): “files_switch” mess up the variable defined by “map.jinja”
- “map.jinja” export a variable name as “<tplroot>” - import of “libtofs.jinja” is done with context and has access to “<tplroot>” variable - in “files_switch”, appending the empty string to the “fsl” variable modify globally “<tplroot>['tofs']['files_switch']” * TEMPLATE/libtofs.jinja: do not use inplace “append” to avoid side effect.
This commit is contained in:
parent
8359cc944f
commit
ab4ce751a4
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@
|
|||
) %}
|
||||
{#- Append an empty value to evaluate as `default` in the loop below #}
|
||||
{%- if '' not in fsl %}
|
||||
{%- do fsl.append('') %}
|
||||
{%- set fsl = fsl + [''] %}
|
||||
{%- endif %}
|
||||
{%- for fs in fsl %}
|
||||
{%- for src_file in src_files %}
|
||||
|
|
Loading…
Add table
Reference in a new issue