From f31c62fbabfb419e3e16a816f158aa28ac8c67ee Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 17 Jun 2022 11:33:52 -0300 Subject: [PATCH] More KiCad environment vars adjusts - KiCad 5 values promoted to KiCad 6 versions when using KiCad 6 --- kibot/kicad/config.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kibot/kicad/config.py b/kibot/kicad/config.py index 99bf28a4..7c655c16 100644 --- a/kibot/kicad/config.py +++ b/kibot/kicad/config.py @@ -326,6 +326,15 @@ class KiConf(object): logger.debug('Using {}="{}" (from KiCad config)'.format(n, val)) if val is not None and ret_val is None: ret_val = val + # Make sure all the versions point to the same place + # It helps if we are using KiCad 6 but have the KiCad 5 names defined, + # KiCad will use them, but any mention to the KiCad 6 version won't be + # valid for KiBot unless we explicitly define it. + if ret_val is not None: + for n in names: + if n not in os.environ or n not in KiConf.kicad_env: + os.environ[n] = ret_val + KiConf.kicad_env[n] = ret_val return ret_val def _set_env_var(base_name, val, ki6_diff, no_dir):