From c3f02ba8950fa584ccbee95237b9f0bd3e84ef89 Mon Sep 17 00:00:00 2001 From: Frode Aarstad Date: Wed, 11 Dec 2024 12:50:55 +0100 Subject: [PATCH] Restore runpath test --- src/everest/bin/everest_script.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/everest/bin/everest_script.py b/src/everest/bin/everest_script.py index ad39a305edc..557b1630b2e 100755 --- a/src/everest/bin/everest_script.py +++ b/src/everest/bin/everest_script.py @@ -23,6 +23,7 @@ from everest.util import ( makedirs_if_needed, version_info, + warn_user_that_runpath_is_nonempty, ) from .utils import ( @@ -113,8 +114,12 @@ async def run_everest(options): except ValueError as exc: raise SystemExit(f"Config validation error: {exc}") from exc - # if EverestRunModel.create(options.config).check_if_runpath_exists(): - # warn_user_that_runpath_is_nonempty() + if ( + options.config.simulation_dir is not None + and os.path.exists(options.config.simulation_dir) + and any(os.listdir(options.config.simulation_dir)) + ): + warn_user_that_runpath_is_nonempty() try: output_dir = options.config.output_dir