Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge "cargo_embargo: include testdata path when File::open fails" in…
Browse files Browse the repository at this point in the history
…to main
  • Loading branch information
Treehugger Robot authored and Gerrit Code Review committed Oct 20, 2023
2 parents 0bd02ce + 7d46558 commit 4f85b5c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/cargo_embargo/src/cargo/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,13 @@ mod tests {
for testdata_directory_path in testdata_directories() {
let cfg: Config = serde_json::from_reader(
File::open(testdata_directory_path.join("cargo_embargo.json"))
.expect("Failed to open cargo_embargo.json"),
.with_context(|| {
format!(
"Failed to open {:?}",
testdata_directory_path.join("cargo_embargo.json")
)
})
.unwrap(),
)
.unwrap();
let cargo_metadata_path = testdata_directory_path.join("cargo.metadata");
Expand Down

0 comments on commit 4f85b5c

Please sign in to comment.