diff --git a/NEWS.md b/NEWS.md index 2692ba55..7f080501 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ - Changed: Show more type parameters in mutant names, like `impl From<&str> for Foo` rather than `impl From for Foo`. +- Fixed: Support crates that use a non-default Cargo registry. Previously, `cargo metadata` failed with "registry index was not found." + ## 25.0.0 - Better estimation of time remaining, based on the time taken to test mutants so far, excluding the time for the baseline. diff --git a/src/workspace.rs b/src/workspace.rs index 33594003..79e81db7 100644 --- a/src/workspace.rs +++ b/src/workspace.rs @@ -102,6 +102,7 @@ impl Workspace { let metadata = cargo_metadata::MetadataCommand::new() .no_deps() .manifest_path(&manifest_path) + .current_dir(&dir) .verbose(false) .exec() .with_context(|| format!("Failed to run cargo metadata on {manifest_path}"))?;