Skip to content

Commit f74eabe

Browse files
committed
fix: use find root to traverse all manifests as a validation
1 parent 02b2b76 commit f74eabe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cargo/core/workspace.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ impl<'gctx> Workspace<'gctx> {
283283
ws.member_ids.insert(id);
284284
ws.default_members.push(ws.current_manifest.clone());
285285
ws.set_resolve_behavior();
286+
// The find_root function is used here to traverse the directory tree and locate the root of the workspace.
287+
// Despite being ephemeral, we still need to validate all the manifests in the workspace,
288+
// which is what `find_root` helps us achieve here.
289+
ws.find_root(ws.current_manifest.clone().as_path())?;
286290
Ok(ws)
287291
}
288292

0 commit comments

Comments
 (0)