diff options
Diffstat (limited to 'lib/python/qmk/cli/compile.py')
-rwxr-xr-x | lib/python/qmk/cli/compile.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py index 7e14ad8fb..6646891b3 100755 --- a/lib/python/qmk/cli/compile.py +++ b/lib/python/qmk/cli/compile.py | |||
@@ -14,11 +14,11 @@ import qmk.keymap | |||
14 | import qmk.path | 14 | import qmk.path |
15 | 15 | ||
16 | 16 | ||
17 | @cli.argument('filename', nargs='?', type=FileType('r'), help='The configurator export to compile') | 17 | @cli.argument('filename', nargs='?', arg_only=True, type=FileType('r'), help='The configurator export to compile') |
18 | @cli.argument('-kb', '--keyboard', help='The keyboard to build a firmware for. Ignored when a configurator export is supplied.') | 18 | @cli.argument('-kb', '--keyboard', help='The keyboard to build a firmware for. Ignored when a configurator export is supplied.') |
19 | @cli.argument('-km', '--keymap', help='The keymap to build a firmware for. Ignored when a configurator export is supplied.') | 19 | @cli.argument('-km', '--keymap', help='The keymap to build a firmware for. Ignored when a configurator export is supplied.') |
20 | @cli.entrypoint('Compile a QMK Firmware.') | 20 | @cli.subcommand('Compile a QMK Firmware.') |
21 | def main(cli): | 21 | def compile(cli): |
22 | """Compile a QMK Firmware. | 22 | """Compile a QMK Firmware. |
23 | 23 | ||
24 | If a Configurator export is supplied this command will create a new keymap, overwriting an existing keymap if one exists. | 24 | If a Configurator export is supplied this command will create a new keymap, overwriting an existing keymap if one exists. |
@@ -41,9 +41,9 @@ def main(cli): | |||
41 | # Compile the keymap | 41 | # Compile the keymap |
42 | command = ['make', ':'.join((user_keymap['keyboard'], user_keymap['keymap']))] | 42 | command = ['make', ':'.join((user_keymap['keyboard'], user_keymap['keymap']))] |
43 | 43 | ||
44 | elif cli.config.general.keyboard and cli.config.general.keymap: | 44 | elif cli.config.compile.keyboard and cli.config.compile.keymap: |
45 | # Generate the make command for a specific keyboard/keymap. | 45 | # Generate the make command for a specific keyboard/keymap. |
46 | command = ['make', ':'.join((cli.config.general.keyboard, cli.config.general.keymap))] | 46 | command = ['make', ':'.join((cli.config.compile.keyboard, cli.config.compile.keymap))] |
47 | 47 | ||
48 | else: | 48 | else: |
49 | cli.log.error('You must supply a configurator export or both `--keyboard` and `--keymap`.') | 49 | cli.log.error('You must supply a configurator export or both `--keyboard` and `--keymap`.') |