summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/cli/compile.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/qmk/cli/compile.py')
-rwxr-xr-xlib/python/qmk/cli/compile.py5
1 files changed, 3 insertions, 2 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 = {}