Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion committed Dec 1, 2024
1 parent 24e8664 commit 24199a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crate_universe/src/splicing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ impl SplicedManifest {
}

pub(crate) fn read_manifest(manifest: &Utf8Path) -> Result<Manifest> {
let content = fs::read_to_string(manifest.as_std_path())?;
let content = fs::read_to_string(manifest.as_std_path()).with_context(|| format!("Failed to read file at {}", manifest))?;
cargo_toml::Manifest::from_str(content.as_str()).context("Failed to deserialize manifest")
}

Expand Down
11 changes: 6 additions & 5 deletions crate_universe/src/splicing/splicer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,20 @@ impl<'a> SplicerKind<'a> {
}
if !missing_labels.is_empty() || !missing_paths.is_empty() {
bail!(
"Some manifests are not being tracked.{}{}",
"Some manifests are not being tracked.\nSplicing manifest: {:#?}\n{}{}",
splicing_manifest,
if !missing_labels.is_empty() {
format!(
"\nPlease add the following labels to the `manifests` key:\n {}.",
missing_labels.join("\n ")
"\nPlease add the following labels to the `manifests` key:\n {}",
missing_labels.join("\n ")
)
} else {
String::new()
},
if !missing_paths.is_empty() {
format!(
" Please add labels for the following paths to the `manifests` key:\n {}.",
missing_paths.join("\n ")
" Please add labels for the following paths to the `manifests` key:\n {}",
missing_paths.join("\n ")
)
} else {
String::new()
Expand Down

0 comments on commit 24199a1

Please sign in to comment.