Skip to content

Commit

Permalink
Don't insist workspace member must be in a subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Nov 8, 2023
1 parent c69d1e1 commit e26b85c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,8 @@ impl PackageFilter {
if let PackageFilter::Auto(dir) = &self {
let package_dir = locate_project(dir, false)?;
let workspace_dir = &metadata.workspace_root;
ensure!(
package_dir.strip_prefix(workspace_dir).is_ok(),
"package {package_dir:?} does not seem to be inside workspace root {workspace_dir:?}",
);
// It's not required that the members be inside the workspace directory: see
// <https://doc.rust-lang.org/cargo/reference/workspaces.html>
for package in metadata.workspace_packages() {
if package.manifest_path.parent().expect("remove Cargo.toml") == package_dir {
debug!("resolved auto package filter to {:?}", package.name);
Expand Down

0 comments on commit e26b85c

Please sign in to comment.