Skip to content

Commit

Permalink
DOC: Demote logging about non-matching glob to warning (#5472)
Browse files Browse the repository at this point in the history
* DOC: Demote logging about non-matching glob to warning

The expand_globs function from conda_build.utils logs an ERROR
when a glob expression returns no matches, this is overly alarming
because the user may now use negative glob expressions which they
don't care if it returns empty or the user may want to use the
same set of glob expressions for multiple platforms some of which
may return empty on some platforms.

#5216
#5455

* Add news entry for #5472

---------

Co-authored-by: Daniel Ching <[email protected]>
Co-authored-by: Matthew R. Becker <[email protected]>
  • Loading branch information
3 people authored Nov 26, 2024
1 parent 8e32fce commit dbfc615
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conda_build/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ def expand_globs(
glob_files = glob(path, recursive=True)
if not glob_files:
log = get_logger(__name__)
log.error(f"Glob {path} did not match in root_dir {root_dir}")
log.warning(f"Glob {path} did not match in root_dir {root_dir}")
# https://docs.python.org/3/library/glob.html#glob.glob states that
# "whether or not the results are sorted depends on the file system".
# Avoid this potential ambiguity by sorting. (see #4185)
Expand Down
19 changes: 19 additions & 0 deletions news/5472-demote-non-mathing-glob-to-warning
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* <news item>

### Bug fixes

* <news item>

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* Demoted logging message about glob finding no matches from error to warning (#5472)

0 comments on commit dbfc615

Please sign in to comment.