diff --git a/python/understack-workflows/understack_workflows/flavor_detect.py b/python/understack-workflows/understack_workflows/flavor_detect.py index f779c9f40..1fcca2e1c 100644 --- a/python/understack-workflows/understack_workflows/flavor_detect.py +++ b/python/understack-workflows/understack_workflows/flavor_detect.py @@ -1,3 +1,5 @@ +import os + from flavor_matcher.machine import Machine from flavor_matcher.matcher import FlavorSpec from flavor_matcher.matcher import Matcher @@ -8,7 +10,8 @@ from understack_workflows.helpers import setup_logger logger = setup_logger(__name__) -FLAVORS = FlavorSpec.from_directory("/etc/understack_flavors/") +FLAVORS_DIR = os.getenv("FLAVORS_DIR", "/etc/understack_flavors/") +FLAVORS = FlavorSpec.from_directory(FLAVORS_DIR) logger.info(f"Loaded {len(FLAVORS)} flavor specifications.")