Evaluate shell command substitutions
dotenvx_primitives::evaluate
Usage
Evaluates shell command substitutions and removes trailing newlines from command output.
use dotenvx_primitives::{evaluate, EvaluateOptions};
let value = evaluate(
"HELLO=$(printf World)",
&EvaluateOptions::default(),
)?;
assert_eq!(value, "HELLO=World");
Options
| Field | Purpose |
|---|---|
| process_env | Environment values supplied to substitutions. |
| running_parsed | Previously parsed values available to substitutions. |