Skip to content

Commit f2715a0

Browse files
authored
Consistently use bin/qmk when that script is called (#12286)
* Pass QMK_BIN down to build_keyboard.mk * choose the correct qmk script
1 parent 90b1e27 commit f2715a0

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ endif
3030
endif
3131

3232
# Determine which qmk cli to use
33-
ifeq (, $(shell which qmk))
33+
ifeq (,$(shell which qmk))
3434
QMK_BIN = bin/qmk
3535
else
3636
QMK_BIN = qmk
@@ -391,7 +391,7 @@ define PARSE_KEYMAP
391391
# Format it in bold
392392
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
393393
# Specify the variables that we are passing forward to submake
394-
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY)
394+
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) QMK_BIN=$$(QMK_BIN)
395395
# And the first part of the make command
396396
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
397397
# The message to display

bin/qmk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def main():
7373
"""
7474
# Change to the root of our checkout
7575
os.environ['ORIG_CWD'] = os.getcwd()
76+
os.environ['DEPRECATED_BIN_QMK'] = '1'
7677
os.chdir(qmk_dir)
7778

7879
print('Warning: The bin/qmk script is being deprecated. Please install the QMK CLI: python3 -m pip install qmk', file=sys.stderr)

lib/python/qmk/commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va
180180
f'VERBOSE={verbose}',
181181
f'COLOR={color}',
182182
'SILENT=false',
183-
'QMK_BIN=qmk',
183+
f'QMK_BIN={"bin/qmk" if "DEPRECATED_BIN_QMK" in os.environ else "qmk"}',
184184
])
185185

186186
return make_command

0 commit comments

Comments
 (0)