mirror of
https://github.com/qmk/qmk_cli.git
synced 2026-08-04 00:06:35 -04:00
Fix the subcommand argument parsing
This commit is contained in:
@@ -66,9 +66,15 @@ def parse_args():
|
||||
|
||||
|
||||
def main():
|
||||
"""Dispatch the CLI subcommand to the proper place.
|
||||
|
||||
We first check to see if the subcommand was provided by the global `qmk`. If it was we import that module and hand control over to the entrypoint.
|
||||
|
||||
All other subcommands are dispatched to the local `qmk`, either the one we are currently in or whatever the user's default qmk_firmware is.
|
||||
"""
|
||||
subcommand, subcommand_args = parse_args()
|
||||
subcommand_module = 'qmk_cli.' + subcommand
|
||||
sys.argv = ['qmk-'+subcommand] + subcommand_args[1:]
|
||||
sys.argv = ['qmk-'+subcommand] + subcommand_args
|
||||
qmk_firmware = find_qmk_firmware()
|
||||
qmk_bin = qmk_firmware / 'bin' / 'qmk'
|
||||
os.environ['QMK_HOME'] = str(qmk_firmware)
|
||||
|
||||
Reference in New Issue
Block a user