Skip to content

Commit

Permalink
Exit early for --output
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard committed Feb 7, 2024
1 parent 40d9173 commit 329bdaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions conda_build/cli/main_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,9 @@ def execute(args: Sequence[str] | None = None) -> int:
config.debug = False
for recipe in parsed.recipe:
output_action(recipe, config)
elif parsed.test:
return 0

if parsed.test:
failed_recipes = []
recipes = chain.from_iterable(
glob(abspath(recipe), recursive=True) if "*" in recipe else [recipe]
Expand Down Expand Up @@ -589,7 +591,7 @@ def execute(args: Sequence[str] | None = None) -> int:
cache_dir=parsed.cache_dir,
)

if not parsed.output and len(utils.get_build_folders(config.croot)) > 0:
if utils.get_build_folders(config.croot):
build.print_build_intermediate_warning(config)

return 0
2 changes: 1 addition & 1 deletion conda_build/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ def get_site_packages(prefix, py_ver):
return os.path.join(get_stdlib_dir(prefix, py_ver), "site-packages")


def get_build_folders(croot):
def get_build_folders(croot: str | os.PathLike | Path) -> list[str]:
# remember, glob is not a regex.
return glob(os.path.join(croot, "*" + "[0-9]" * 10 + "*"), recursive=True)

Expand Down

0 comments on commit 329bdaf

Please sign in to comment.