Fix the subcommand argument parsing

This commit is contained in:
skullY
2019-06-30 22:53:20 -07:00
parent f82235e12e
commit 680c786cd8
+7 -1
View File
@@ -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)