(source: &SourcePin, path: &Path)
| 5206 | } |
| 5207 | |
| 5208 | fn ensure_clean_checkout(source: &SourcePin, path: &Path) -> Result<()> { |
| 5209 | if !path.exists() { |
| 5210 | bail!("source checkout is missing: {}", path.display()); |
| 5211 | } |
| 5212 | let status = source_checkout_status_for_source(source.name.as_str(), path) |
| 5213 | .with_context(|| format!("read status for {}", path.display()))?; |
| 5214 | if !status.trim().is_empty() { |
| 5215 | bail!( |
| 5216 | "source checkout {} ({}) has uncommitted changes; preserve them before fetching pins", |
| 5217 | path.display(), |
| 5218 | source.name |
| 5219 | ); |
| 5220 | } |
| 5221 | Ok(()) |
| 5222 | } |
| 5223 | |
| 5224 | fn load_sources_manifest() -> Result<SourcesManifest> { |
| 5225 | let path = Path::new("assets/sources.toml"); |
no test coverage detected