summaryrefslogtreecommitdiff
path: root/lib/python/qmk
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-06-15 22:43:54 +0100
committerGitHub <noreply@github.com>2022-06-15 22:43:54 +0100
commitd3dfa83b4069507df5e8e36def33826a269cd720 (patch)
tree30513b0ae1fb12b10041226a64760ba8c7cb777f /lib/python/qmk
parent7224d84167d89cc0923448d16e785f59334e9007 (diff)
downloadqmk_firmware-d3dfa83b4069507df5e8e36def33826a269cd720.tar.gz
qmk_firmware-d3dfa83b4069507df5e8e36def33826a269cd720.zip
Fix clean arg handling (#17392)
Diffstat (limited to 'lib/python/qmk')
-rwxr-xr-xlib/python/qmk/cli/compile.py5
-rw-r--r--lib/python/qmk/cli/flash.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py
index acbd778649..95118e6687 100755
--- a/lib/python/qmk/cli/compile.py
+++ b/lib/python/qmk/cli/compile.py
@@ -32,8 +32,9 @@ def compile(cli):
If a keyboard and keymap are provided this command will build a firmware based on that.
"""
if cli.args.clean and not cli.args.filename and not cli.args.dry_run:
- command = create_make_command(cli.config.compile.keyboard, cli.config.compile.keymap, 'clean')
- cli.run(command, capture_output=False, stdin=DEVNULL)
+ if cli.config.compile.keyboard and cli.config.compile.keymap:
+ command = create_make_command(cli.config.compile.keyboard, cli.config.compile.keymap, 'clean')
+ cli.run(command, capture_output=False, stdin=DEVNULL)
# Build the environment vars
envs = {}
diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py
index 28e48a4101..216896b974 100644
--- a/lib/python/qmk/cli/flash.py
+++ b/lib/python/qmk/cli/flash.py
@@ -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 = {}