Function parse_with_overrides

Source
pub fn parse_with_overrides(
    text: &str,
    vars: &[(String, String)],
) -> Result<Site, Fail>
Expand description

Parse a site file and set one value per (name, value) pair over it.

EB_PIPELINE__FILESYSTEMS__SCRATCH=/scratch/x sets filesystems.scratch: the name after the prefix is split on __ and each part lowercased. The value is read as a TOML value (true, 16, ["a", "b"], "16") and taken as a string when it does not parse as one. Missing tables are created. A path through an array of tables (targets) is refused, so per-target values stay in the file. The result is checked by the same schema as the file, so an unknown key or a wrong type is a usage error. Pairs apply in name order, so the outcome does not depend on the order of the environment.