From c99add926c04c0b2c516333545dfa4e7d8386a30 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Mon, 10 Jun 2024 14:12:33 -0500 Subject: [PATCH] Fix archive paths for test packages in the alternative registry --- crates/cargo-test-support/src/registry.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/cargo-test-support/src/registry.rs b/crates/cargo-test-support/src/registry.rs index f8b4b1447822..6ddd59e38a8c 100644 --- a/crates/cargo-test-support/src/registry.rs +++ b/crates/cargo-test-support/src/registry.rs @@ -1649,7 +1649,12 @@ impl Package { /// Returns the path to the compressed package file. pub fn archive_dst(&self) -> PathBuf { if self.local { - registry_path().join(format!("{}-{}.crate", self.name, self.vers)) + let path = if self.alternative { + alt_registry_path() + } else { + registry_path() + }; + path.join(format!("{}-{}.crate", self.name, self.vers)) } else if self.alternative { alt_dl_path() .join(&self.name)