Skip to content

Commit f7b8c6f

Browse files
authored
reduce sensitivity to config change by matching packages based on their folder name (#10)
1 parent ce8baa8 commit f7b8c6f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/project.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl Project {
157157

158158
let file_name = relative_path.file_name().expect("expected a file_name");
159159

160-
if file_name.eq_ignore_ascii_case("package.yml") && matches_globs(&relative_path, &config.ruby_package_paths) {
160+
if file_name.eq_ignore_ascii_case("package.yml") && matches_globs(relative_path.parent().unwrap(), &config.ruby_package_paths) {
161161
if let Some(owner) = package_owner(&absolute_path)? {
162162
packages.push(Package {
163163
path: relative_path.clone(),
@@ -167,7 +167,9 @@ impl Project {
167167
}
168168
}
169169

170-
if file_name.eq_ignore_ascii_case("package.json") && matches_globs(&relative_path, &config.javascript_package_paths) {
170+
if file_name.eq_ignore_ascii_case("package.json")
171+
&& matches_globs(relative_path.parent().unwrap(), &config.javascript_package_paths)
172+
{
171173
if let Some(owner) = package_owner(&absolute_path)? {
172174
packages.push(Package {
173175
path: relative_path.clone(),

0 commit comments

Comments
 (0)