From: Jannis Harder Date: Tue, 5 Jul 2022 15:20:55 +0000 (+0200) Subject: Read config before creating a workdir X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=566edad13c369bd4a4f5c7bc61a11b7e5d390493;p=SymbiYosys.git 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. --- 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():