Skip to main content

parse_program_needs

Function parse_program_needs 

Source
pub fn parse_program_needs(
    manifest_yaml: &str,
) -> Result<Vec<ProgramNeeds>, ManifestError>
Expand description

Reads the top-level programs: block from an artifact’s bundled manifest text.

Ok with an empty list means the manifest has no programs key. Err names the dotted field at fault (programs.<program>.needs[<index>].<key>) and the value: the block on a driver, hook or skill artifact; a program key that is not a bare name; a need holding no form, two forms or a key other than a form key, beside and packages; library not a soname; file not a bare file name, or beside naming no library: entry of the same program; program_folder or etc an absolute path, a home folder, an environment expansion or a path climbing with ..; etc naming a credential location (ETC_CREDENTIAL_LOCATIONS); system not one of SystemLocation::ALL; packages not a map of lowercase os-release IDs to package names; a program holding neither needs nor download, or a malformed download entry (crate::parse_program_downloads reads those). A program with only download has no needs.