diff options
author | Joel Challis <[email protected]> | 2025-01-29 19:17:29 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2025-01-30 06:17:29 +1100 |
commit | 76b5cef79345cdb42bbcb42417f56881c4e59b2d (patch) | |
tree | 1fde56de3f33c4de7a5eb0329690599294d0533d | |
parent | 04c2dbd3dfa23bf6fdffa35ae53cf66aa3f33fba (diff) | |
download | qmk_firmware-76b5cef79345cdb42bbcb42417f56881c4e59b2d.tar.gz qmk_firmware-76b5cef79345cdb42bbcb42417f56881c4e59b2d.zip |
Reject keyboard.json next to info.json (#24882)
-rw-r--r-- | lib/python/qmk/info.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 38ca89697c..d70e7ee1b3 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -99,6 +99,13 @@ def _validate_build_target(keyboard, info_data): if info_file != keyboard_json_path: _log_error(info_data, f'Invalid keyboard.json location detected: {info_file}.') + # No keyboard.json next to info.json + for conf_file in config_files: + if conf_file.name == 'keyboard.json': + info_file = conf_file.parent / 'info.json' + if info_file.exists(): + _log_error(info_data, f'Invalid info.json location detected: {info_file}.') + # Moving forward keyboard.json should be used as a build target if keyboard_json_count == 0: _log_warning(info_data, 'Build marker "keyboard.json" not found.') |