1
0
Fork 0

[CLI] Don't exit() when certain exceptions occur. (#23442)

This commit is contained in:
Nick Brassel 2024-06-15 19:37:47 +10:00 committed by GitHub
parent d4654ab893
commit 0262161914
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 55 additions and 12 deletions

View file

@ -2,6 +2,7 @@
"""
from milc import cli
from qmk.search import filter_help, search_keymap_targets
from qmk.util import maybe_exit_config
@cli.argument(
@ -19,6 +20,8 @@ from qmk.search import filter_help, search_keymap_targets
def find(cli):
"""Search through all keyboards and keymaps for a given search criteria.
"""
maybe_exit_config(should_exit=False, should_reraise=True)
targets = search_keymap_targets([('all', cli.config.find.keymap)], cli.args.filter)
for target in sorted(targets, key=lambda t: (t.keyboard, t.keymap)):
print(f'{target}')