~ruther/qmk_firmware

66060f1935f811dc9b69aa73152fde2db18d22d6 — zvecr 1 year, 3 months ago 1ea9f2e + fb11330
Merge remote-tracking branch 'origin/master' into develop
1 files changed, 13 insertions(+), 5 deletions(-)

M lib/python/qmk/path.py
M lib/python/qmk/path.py => lib/python/qmk/path.py +13 -5
@@ 12,12 12,20 @@ from qmk.errors import NoSuchKeyboardError
def is_keyboard(keyboard_name):
    """Returns True if `keyboard_name` is a keyboard we can compile.
    """
    if keyboard_name:
        keyboard_path = QMK_FIRMWARE / 'keyboards' / keyboard_name
        rules_mk = keyboard_path / 'rules.mk'
        keyboard_json = keyboard_path / 'keyboard.json'
    if not keyboard_name:
        return False

    # keyboard_name values of 'c:/something' or '/something' trigger append issues
    # due to "If the argument is an absolute path, the previous path is ignored"
    # however it should always be a folder located under qmk_firmware/keyboards
    if Path(keyboard_name).is_absolute():
        return False

    keyboard_path = QMK_FIRMWARE / 'keyboards' / keyboard_name
    rules_mk = keyboard_path / 'rules.mk'
    keyboard_json = keyboard_path / 'keyboard.json'

        return rules_mk.exists() or keyboard_json.exists()
    return rules_mk.exists() or keyboard_json.exists()


def under_qmk_firmware(path=Path(os.environ['ORIG_CWD'])):

Do not follow this link