Skip to main content

render_env

Function render_env 

Source
pub fn render_env(
    top_env: Option<&IndexMap<String, String>>,
    daemon_env: Option<&IndexMap<String, String>>,
    context: &TemplateContext,
) -> Result<Option<IndexMap<String, String>>, RenderError>
Expand description

Merge top-level and per-daemon env, render template values, and return the rendered env. Used by hook rendering where the daemon config is not mutated.

Env values are rendered with a context that does not include env itself, preventing self-reference cycles. Callers that want {{ env.X }} available in subsequent rendering should set the result on the context via TemplateContext::set_env.