Skip to content

Commit df7dd36

Browse files
committed
fix: Update build matrix when adding board only
This fixes an issue where "zmk keyboard add" did not update the build matrix when adding a keyboard that used only boards and no shields. Fixes zmkfirmware#18
1 parent 647bb0c commit df7dd36

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

zmk/commands/keyboard/add.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,12 @@ def _get_build_items(keyboard: Keyboard, controller: Board | None):
158158
case _:
159159
raise ValueError("Unexpected keyboard/controller combination")
160160

161-
return [BuildItem(board=b, shield=s) for b, s in itertools.product(boards, shields)]
161+
if shields:
162+
return [
163+
BuildItem(board=b, shield=s) for b, s in itertools.product(boards, shields)
164+
]
165+
166+
return [BuildItem(board=b) for b in boards]
162167

163168

164169
def _add_keyboard(repo: Repo, keyboard: Keyboard, controller: Board | None):

0 commit comments

Comments
 (0)