fresh-cat-90827
11/28/2022, 3:51 PMSpecsPaths
from a string representing a glob, e.g. foo/bar/*.py
?fresh-cat-90827
11/28/2022, 3:51 PMSpecsPaths
for this, which is exactly what I need; however, I'd like to either raise an exception or log an error if a glob doesn't expand to any source file.
I have a custom Target
with a custom field containing a list of globs, so I don't think I can take advantage of the unmatched_build_file_globs global option? 😕
I can solve this by doing glob.glob
in plain Python (to expand a glob pattern and see if any files are found) and I could even do that with async def
/ await
so that Python doesn't wait on a massive glob like ***/**
and can continue with the rest of the globs in the loop. However, it may make more sense to do with Pants engine instead?curved-television-6568
11/28/2022, 3:53 PMcurved-television-6568
11/28/2022, 3:54 PM