aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/multibuild.py
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-05-19 15:24:46 -0700
committerGitHub <noreply@github.com>2021-05-19 15:24:46 -0700
commitdb1eacdaacb9c8f6889f46bc1c6af155b81ad72a (patch)
treecd32a69a04c7ff93a11941d82aef3ce31c2b7523 /lib/python/qmk/cli/multibuild.py
parenta9aec546c873fa5a2cb1d9a10878aca71818b609 (diff)
downloadqmk_firmware-db1eacdaacb9c8f6889f46bc1c6af155b81ad72a.tar.gz
qmk_firmware-db1eacdaacb9c8f6889f46bc1c6af155b81ad72a.zip
Align our subprocess usage with current best practices. (#12940)
* Align our subprocess usage with current best practices. * remove unused import * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> * fix the cpp invocation for older python * allow for unprompted installation * make sure qmk new-keyboard works on windows Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'lib/python/qmk/cli/multibuild.py')
-rwxr-xr-xlib/python/qmk/cli/multibuild.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/python/qmk/cli/multibuild.py b/lib/python/qmk/cli/multibuild.py
index a4f0a0cc0..46594c099 100755
--- a/lib/python/qmk/cli/multibuild.py
+++ b/lib/python/qmk/cli/multibuild.py
@@ -4,6 +4,7 @@ This will compile everything in parallel, for testing purposes.
4""" 4"""
5import re 5import re
6from pathlib import Path 6from pathlib import Path
7from subprocess import DEVNULL
7 8
8from milc import cli 9from milc import cli
9 10
@@ -35,7 +36,7 @@ def multibuild(cli):
35 36
36 make_cmd = _find_make() 37 make_cmd = _find_make()
37 if cli.args.clean: 38 if cli.args.clean:
38 cli.run([make_cmd, 'clean'], capture_output=False, text=False) 39 cli.run([make_cmd, 'clean'], capture_output=False, stdin=DEVNULL)
39 40
40 builddir = Path(QMK_FIRMWARE) / '.build' 41 builddir = Path(QMK_FIRMWARE) / '.build'
41 makefile = builddir / 'parallel_kb_builds.mk' 42 makefile = builddir / 'parallel_kb_builds.mk'
@@ -75,4 +76,4 @@ all: {keyboard_safe}_binary
75 ) 76 )
76 # yapf: enable 77 # yapf: enable
77 78
78 cli.run([make_cmd, '-j', str(cli.args.parallel), '-f', makefile, 'all'], capture_output=False, text=False) 79 cli.run([make_cmd, '-j', str(cli.args.parallel), '-f', makefile, 'all'], capture_output=False, stdin=DEVNULL)