We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d127f58 commit 8e9f2bcCopy full SHA for 8e9f2bc
1 file changed
bough/analyzer.py
@@ -165,12 +165,11 @@ def _find_direct_packages(
165
directly_affected = set()
166
strip_prefix = self.workspace_root.relative_to(self.repo_root)
167
for file_path in changed_files:
168
- try:
+ if Path(file_path).is_relative_to(strip_prefix):
169
file_path_obj = Path(file_path).relative_to(strip_prefix)
170
- except ValueError as e:
171
- if "is not in the subpath" in str(e):
172
- logger.debug("Ignoring file {file_path} outside of workspace")
173
- continue
+ else:
+ logger.debug(f"Ignoring file {file_path} outside of workspace")
+ continue
174
175
if self._matches_patterns(file_path, self.config.ignore):
176
logger.debug(f"Ignoring file {file_path} (matches ignore patterns)")
0 commit comments