Skip to main content

inject_input

Function inject_input 

Source
pub fn inject_input(template: &str, input: Option<&str>) -> String
Expand description

Replace {{input}} placeholders in a template string with the given value. If input is None, replaces with empty string.

The replacement is shell-escaped to prevent injection when the result is passed to sh -c.