diff options
| author | Zach White <skullydazed@gmail.com> | 2021-01-02 09:27:35 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-02 17:27:35 +0000 |
| commit | c07543133a092039c7eae0cead6c9ee3badcc7dc (patch) | |
| tree | 4c261f9db906e8c986e5bf274e41f650b5b4201d | |
| parent | 2e9d0919600e4b834a4e48c1673fe638c4b92eab (diff) | |
| download | qmk_firmware-c07543133a092039c7eae0cead6c9ee3badcc7dc.tar.gz qmk_firmware-c07543133a092039c7eae0cead6c9ee3badcc7dc.zip | |
Return the make exit code for qmk compile and flash (#11402)
| -rwxr-xr-x | lib/python/qmk/cli/compile.py | 3 | ||||
| -rw-r--r-- | lib/python/qmk/cli/flash.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py index 341f365f8..daee597d8 100755 --- a/lib/python/qmk/cli/compile.py +++ b/lib/python/qmk/cli/compile.py | |||
| @@ -48,7 +48,8 @@ def compile(cli): | |||
| 48 | cli.log.info('Compiling keymap with {fg_cyan}%s', ' '.join(command)) | 48 | cli.log.info('Compiling keymap with {fg_cyan}%s', ' '.join(command)) |
| 49 | if not cli.args.dry_run: | 49 | if not cli.args.dry_run: |
| 50 | cli.echo('\n') | 50 | cli.echo('\n') |
| 51 | subprocess.run(command) | 51 | compile = subprocess.run(command) |
| 52 | return compile.returncode | ||
| 52 | 53 | ||
| 53 | else: | 54 | else: |
| 54 | cli.log.error('You must supply a configurator export, both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.') | 55 | cli.log.error('You must supply a configurator export, both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.') |
diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py index cefb9ca31..d720d42e7 100644 --- a/lib/python/qmk/cli/flash.py +++ b/lib/python/qmk/cli/flash.py | |||
| @@ -81,7 +81,8 @@ def flash(cli): | |||
| 81 | cli.log.info('Compiling keymap with {fg_cyan}%s', ' '.join(command)) | 81 | cli.log.info('Compiling keymap with {fg_cyan}%s', ' '.join(command)) |
| 82 | if not cli.args.dry_run: | 82 | if not cli.args.dry_run: |
| 83 | cli.echo('\n') | 83 | cli.echo('\n') |
| 84 | subprocess.run(command) | 84 | compile = subprocess.run(command) |
| 85 | return compile.returncode | ||
| 85 | 86 | ||
| 86 | else: | 87 | else: |
| 87 | cli.log.error('You must supply a configurator export, both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.') | 88 | cli.log.error('You must supply a configurator export, both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.') |
