Skip to content

Commit

Permalink
Return the make exit code for qmk compile and flash (qmk#11402)
Browse files Browse the repository at this point in the history
  • Loading branch information
skullydazed authored and drashna committed Jan 13, 2021
1 parent 882d3a3 commit 8f03f44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/python/qmk/cli/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def compile(cli):
cli.log.info('Compiling keymap with {fg_cyan}%s', ' '.join(command))
if not cli.args.dry_run:
cli.echo('\n')
subprocess.run(command)
compile = subprocess.run(command)
return compile.returncode

else:
cli.log.error('You must supply a configurator export, both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.')
Expand Down
3 changes: 2 additions & 1 deletion lib/python/qmk/cli/flash.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def flash(cli):
cli.log.info('Compiling keymap with {fg_cyan}%s', ' '.join(command))
if not cli.args.dry_run:
cli.echo('\n')
subprocess.run(command)
compile = subprocess.run(command)
return compile.returncode

else:
cli.log.error('You must supply a configurator export, both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.')
Expand Down

0 comments on commit 8f03f44

Please sign in to comment.