From f09bdf9c6af7a0a16787363c08ca70d1e32936d9 Mon Sep 17 00:00:00 2001 From: Tim Pillinger <26465611+wxtim@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:07:08 +0000 Subject: [PATCH] Exit immediately if folder pre-configure is called on does not have a rose-suite.conf --- cylc/rose/entry_points.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cylc/rose/entry_points.py b/cylc/rose/entry_points.py index 9f9b5d54..f749cd56 100644 --- a/cylc/rose/entry_points.py +++ b/cylc/rose/entry_points.py @@ -34,6 +34,10 @@ def pre_configure(srcdir: Path, opts: 'Values') -> dict: """Run before the Cylc configuration is read.""" + if not rose_config_exists(srcdir): + # nothing to do here + return {} + # load the Rose config config_tree = load_rose_config(Path(srcdir), opts=opts) @@ -53,6 +57,7 @@ def post_install(srcdir: Path, rundir: str, opts: 'Values') -> bool: if not rose_config_exists(srcdir): # nothing to do here return False + _rundir: Path = Path(rundir) # transfer the rose-suite.conf file