MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / load_profile_import_items

Function load_profile_import_items

crates/openshell-cli/src/run.rs:5450–5467  ·  view source on GitHub ↗
(
    file: Option<&Path>,
    from: Option<&Path>,
)

Source from the content-addressed store, hash-verified

5448}
5449
5450fn load_profile_import_items(
5451 file: Option<&Path>,
5452 from: Option<&Path>,
5453) -> Result<(
5454 Vec<ProviderProfileImportItem>,
5455 Vec<ProviderProfileDiagnostic>,
5456)> {
5457 let paths = profile_source_paths(file, from)?;
5458 let mut items = Vec::new();
5459 let mut diagnostics = Vec::new();
5460 for path in paths {
5461 match load_profile_import_item(&path) {
5462 Ok(item) => items.push(item),
5463 Err(diagnostic) => diagnostics.push(diagnostic),
5464 }
5465 }
5466 Ok((items, diagnostics))
5467}
5468
5469fn profile_source_paths(file: Option<&Path>, from: Option<&Path>) -> Result<Vec<PathBuf>> {
5470 if let Some(file) = file {

Callers 3

provider_profile_importFunction · 0.85
provider_profile_updateFunction · 0.85
provider_profile_lintFunction · 0.85

Calls 3

profile_source_pathsFunction · 0.85
load_profile_import_itemFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected