From 566edad13c369bd4a4f5c7bc61a11b7e5d390493 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Tue, 5 Jul 2022 17:20:55 +0200 Subject: [PATCH] Read config before creating a workdir When using a task name not defined in the config, this now produces an error before creating an unnecessary workdir for that non-existing task. --- sbysrc/sby.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbysrc/sby.py b/sbysrc/sby.py index b802b7a..0628c6d 100644 --- a/sbysrc/sby.py +++ b/sbysrc/sby.py @@ -402,6 +402,8 @@ if (workdir is not None) and (len(tasknames) != 1): sys.exit(1) def run_task(taskname): + sbyconfig, _, _, _ = read_sbyconfig(sbydata, taskname) + my_opt_tmpdir = opt_tmpdir my_workdir = None @@ -461,7 +463,6 @@ def run_task(taskname): else: junit_filename = "junit" - sbyconfig, _, _, _ = read_sbyconfig(sbydata, taskname) task = SbyTask(sbyconfig, my_workdir, early_logmsgs, reusedir) for k, v in exe_paths.items(): -- 2.30.2