Fix clean arg handling (#17392)

This commit is contained in:
Joel Challis authored and GitHub committed 2022-06-15 22:43:54 +01:00
1 parent 7224d84167
commit d3dfa83b40
2 files changed
+6 -4

No files matched your search

+3 -2
View File
@@ -59,8 +59,9 @@ def flash(cli):
If bootloader is omitted the make system will use the configured bootloader for that keyboard.
"""
if cli.args.clean and not cli.args.filename and not cli.args.dry_run:
command = create_make_command(cli.config.flash.keyboard, cli.config.flash.keymap, 'clean')
cli.run(command, capture_output=False, stdin=DEVNULL)
if cli.config.flash.keyboard and cli.config.flash.keymap:
command = create_make_command(cli.config.flash.keyboard, cli.config.flash.keymap, 'clean')
cli.run(command, capture_output=False, stdin=DEVNULL)
# Build the environment vars
envs = {}