Skip to main content

resolve_variables

Function resolve_variables 

Source
pub fn resolve_variables(
    template: &str,
    overrides: &BTreeMap<String, String>,
    workflow_defaults: &BTreeMap<String, String>,
    store_vars: &BTreeMap<String, String>,
) -> String
Expand description

Resolve all {{var}} placeholders in a template string.

Resolution order:

  1. overrides (CLI –var flags)
  2. workflow_defaults (from workflow’s variables section)
  3. store_vars (global + active profile from VariableStore)
  4. Environment variables

Unresolved variables are left as-is (with a warning to stderr).