mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-04 07:22:46 +00:00
Workaround for resolving keyboard alias for config file values (#25228)
This commit is contained in:
parent
60ac859852
commit
cf5ce64b1b
@ -5,7 +5,7 @@ from time import monotonic
|
||||
|
||||
from milc import cli
|
||||
|
||||
from qmk.keyboard import find_keyboard_from_dir
|
||||
from qmk.keyboard import find_keyboard_from_dir, keyboard_folder
|
||||
from qmk.keymap import find_keymap_from_dir
|
||||
|
||||
|
||||
@ -27,6 +27,11 @@ def automagic_keyboard(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
cmd = _get_subcommand_name()
|
||||
|
||||
# TODO: Workaround for if config file contains "old" keyboard name
|
||||
# Potential long-term fix needs to be within global cli or milc
|
||||
if cli.config_source[cmd]['keyboard'] == 'config_file':
|
||||
cli.config[cmd]['keyboard'] = keyboard_folder(cli.config[cmd]['keyboard'])
|
||||
|
||||
# Ensure that `--keyboard` was not passed and CWD is under `qmk_firmware/keyboards`
|
||||
if cli.config_source[cmd]['keyboard'] != 'argument':
|
||||
keyboard = find_keyboard_from_dir()
|
||||
|
Loading…
Reference in New Issue
Block a user