From ebeba25c30b9a5cb812d169088a4715756acdf1f Mon Sep 17 00:00:00 2001 From: yusyus Date: Tue, 3 Feb 2026 21:08:33 +0300 Subject: [PATCH] fix: Fix config file detection in temp directories - Change _walk_directory to check relative paths instead of absolute paths - Fixes issue where SKIP_DIRS containing 'tmp' was skipping all files under /tmp/ - This was causing test failures on Ubuntu (tests use tempfile.mkdtemp() which creates under /tmp) - Now only skips directories that are within the search directory, not in the absolute path Fixes test_config_extractor.py failures on Ubuntu Co-Authored-By: Claude Sonnet 4.5 --- src/skill_seekers/cli/config_extractor.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/skill_seekers/cli/config_extractor.py b/src/skill_seekers/cli/config_extractor.py index de819e3..02163a2 100644 --- a/src/skill_seekers/cli/config_extractor.py +++ b/src/skill_seekers/cli/config_extractor.py @@ -299,8 +299,13 @@ class ConfigFileDetector: if item.is_dir(): continue - # Skip if in excluded directory - if any(skip_dir in item.parts for skip_dir in self.SKIP_DIRS): + # Skip if in excluded directory (check relative path only) + try: + relative_parts = item.relative_to(directory).parts + if any(skip_dir in relative_parts for skip_dir in self.SKIP_DIRS): + continue + except ValueError: + # Item is not relative to directory, skip it continue yield item