mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
Merge pull request #19293 from github/redsun82/rust-fix-member-aggregation
Rust: fix workspace member aggregation when absolute path is a glob pattern
This commit is contained in:
@@ -173,8 +173,10 @@ impl TomlReader {
|
||||
}
|
||||
|
||||
fn workspace_members_match(workspace_dir: &AbsPath, members: &[String], target: &AbsPath) -> bool {
|
||||
members.iter().any(|p| {
|
||||
glob::Pattern::new(workspace_dir.join(p).as_str()).is_ok_and(|p| p.matches(target.as_str()))
|
||||
target.strip_prefix(workspace_dir).is_some_and(|rel_path| {
|
||||
members
|
||||
.iter()
|
||||
.any(|p| glob::Pattern::new(p).is_ok_and(|p| p.matches(rel_path.as_str())))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
"deps": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user