Download relevant toolchain.

This commit is contained in:
Nick Brassel
2024-07-01 21:49:21 +10:00
parent 3ffe8d917a
commit 33f5e67408
7 changed files with 109 additions and 1 deletions
+9
View File
@@ -82,6 +82,7 @@ subcommands = [
'qmk.cli.painter',
'qmk.cli.pytest',
'qmk.cli.test.c',
'qmk.cli.toolchain.commands',
'qmk.cli.userspace.add',
'qmk.cli.userspace.compile',
'qmk.cli.userspace.doctor',
@@ -258,3 +259,11 @@ for subcommand in subcommands:
_eprint(f'Warning: Could not import {subcommand}: {e.__class__.__name__}, {e}')
else:
raise
# Add the QMK toolchains to $PATH
try:
from qmk.constants import QMK_TOOLCHAINS_PATH # noqa
if QMK_TOOLCHAINS_PATH.exists():
os.environ['PATH'] = f'{QMK_TOOLCHAINS_PATH}/bin{os.pathsep}{os.environ["PATH"]}'
except Exception:
pass