summaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-05-19 16:05:43 +1000
committerGitHub <noreply@github.com>2023-05-19 16:05:43 +1000
commitdc75c23f5c4768d48e6e77fb4e795ff0e0ee2d7f (patch)
tree2e2a2f07c1de1242afcabf888bf08b1db3379cac /lib/python/qmk/cli
parent78afa1164dcae6b4acdac46d284850e6137fe41c (diff)
CLI: Improve keymap folder resolution (#20981)
Diffstat (limited to 'lib/python/qmk/cli')
-rwxr-xr-xlib/python/qmk/cli/new/keymap.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/python/qmk/cli/new/keymap.py b/lib/python/qmk/cli/new/keymap.py
index e7823bc46d..9b0ac221a4 100755
--- a/lib/python/qmk/cli/new/keymap.py
+++ b/lib/python/qmk/cli/new/keymap.py
@@ -5,7 +5,7 @@ import shutil
from milc import cli
from milc.questions import question
-from qmk.path import is_keyboard, keymap
+from qmk.path import is_keyboard, keymaps, keymap
from qmk.git import git_get_username
from qmk.decorators import automagic_keyboard, automagic_keymap
from qmk.keyboard import keyboard_completer, keyboard_folder
@@ -50,9 +50,9 @@ def new_keymap(cli):
return False
# generate keymap paths
- km_path = keymap(kb_name)
- keymap_path_default = km_path / 'default'
- keymap_path_new = km_path / user_name
+ keymaps_dirs = keymaps(kb_name)
+ keymap_path_default = keymap(kb_name, 'default')
+ keymap_path_new = keymaps_dirs[0] / user_name
if not keymap_path_default.exists():
cli.log.error(f'Default keymap {{fg_cyan}}{keymap_path_default}{{fg_reset}} does not exist!')