From d558f9b1b0ee387385b159902231498a5f71e4be Mon Sep 17 00:00:00 2001 From: Julius Busecke Date: Mon, 11 Dec 2023 19:33:09 -0500 Subject: [PATCH] Add check that feedstock dir is detected --- action/deploy_recipe.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/action/deploy_recipe.py b/action/deploy_recipe.py index 44bc874..96bea97 100644 --- a/action/deploy_recipe.py +++ b/action/deploy_recipe.py @@ -61,6 +61,11 @@ def main(): if autodetect_feedstock_folder: # find all folders that have a `meta.yaml` file in them feedstock_subdirs = [f for f,_,files in os.walk(cwd) if 'meta.yaml' in files] + if len(feedstock_subdirs) == 0: + raise ValueError( + "No feedstock subdirectories found. Please confirm that at least one directory " + "in the repo contains a `meta.yaml` file." + ) else: feedstock_subdirs = os.path.join(cwd, "feedstock") print(f"{feedstock_subdirs = }")