Skip to main content

load_profiles

Function load_profiles 

Source
pub fn load_profiles(
    home: &Path,
) -> Result<Option<ResolvedProfiles>, FoundationError>
Expand description

Load profiles.json from the standard location and validate it strictly.

  • home: directory containing profiles.json. Tests pass a tempdir; the CLI passes foundation_home().
  • Returns Ok(None) when the file does not exist (the standalone default has no Foundation profiles — the local path is the resolution step).
  • Returns Err(FoundationError::…) on any parse-level rejection; the caller must report the reason and fall through, never silently pick a different provider.