variable_dict_merge_tolerant

Define a variable resulting of the merge of two other variables, allowing merging undefined variables.

⚙️ Compatible targets: Linux

Parameters

NameDocumentation
prefixThe prefix of the variable name.

This parameter is required.
nameThe variable to define, the full name will be prefix.name.

This parameter is required.
first_variableThe first variable, which content will be overridden in the resulting variable if necessary (written in the form prefix.name).

This parameter is required.
second_variableThe second variable, which content will override the first in the resulting variable if necessary (written in the form prefix.name).

This parameter is required.

Outcome conditions

You need to replace ${name} with its actual canonified value.

  • ✅ Ok: variable_dict_merge_tolerant_${name}_ok
    • ☑️ Already compliant: variable_dict_merge_tolerant_${name}_kept
    • 🟨 Repaired: variable_dict_merge_tolerant_${name}_repaired
  • ❌ Error: variable_dict_merge_tolerant_${name}_error

Example

method: variable_dict_merge_tolerant
params:
  second_variable: VALUE
  first_variable: VALUE
  name: VALUE
  prefix: VALUE

Documentation

To use the generated variable, you must use the form ${prefix.name[key]} with each name replaced with the parameters of this method.

See variable_dict_merge for usage documentation. The only difference is that this method will not fail if one of the variables do not exist, and will return the other one. If both are undefined, the method will still fail.