From 940d6f5678f042cd5291c228a7142fb28b55cb34 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 30 Sep 2026 16:23:18 +0100 Subject: [PATCH] Fix locating of qmk_firrmware on milc>=2.0.0 (#85) --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4b045ed1..936b7377 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,13 @@ ifeq ($(QMK_USERSPACE),) QMK_USERSPACE := $(shell pwd) endif -QMK_FIRMWARE_ROOT = $(shell qmk config -ro user.qmk_home | cut -d= -f2 | sed -e 's@^None$$@@g') +# Determine which qmk cli to use +QMK_BIN := qmk + +# Try to determine qmk_firmware from qmk config - no fallback is required as this functionality has existed since qmk_cli 0.0.46 +QMK_FIRMWARE_ROOT = $(shell $(QMK_BIN) env QMK_FIRMWARE) ifeq ($(QMK_FIRMWARE_ROOT),) - $(error Cannot determine qmk_firmware location. `qmk config -ro user.qmk_home` is not set) + $(error Cannot determine qmk_firmware location. `qmk config -ro user.qmk_home` or QMK_HOME environment variable is not set) endif %: