From db1eacdaacb9c8f6889f46bc1c6af155b81ad72a Mon Sep 17 00:00:00 2001 From: Zach White Date: Wed, 19 May 2021 15:24:46 -0700 Subject: 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 * fix the cpp invocation for older python * allow for unprompted installation * make sure qmk new-keyboard works on windows Co-authored-by: Ryan --- lib/python/qmk/cli/compile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/python/qmk/cli/compile.py') diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py index 23ca4e00a6..7a45e77214 100755 --- a/lib/python/qmk/cli/compile.py +++ b/lib/python/qmk/cli/compile.py @@ -2,6 +2,8 @@ You can compile a keymap already in the repo or using a QMK Configurator export. """ +from subprocess import DEVNULL + from argcomplete.completers import FilesCompleter from milc import cli @@ -31,8 +33,7 @@ def compile(cli): """ 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') - # FIXME(skullydazed/anyone): Remove text=False once milc 1.0.11 has had enough time to be installed everywhere. - cli.run(command, capture_output=False, text=False) + cli.run(command, capture_output=False, stdin=DEVNULL) # Build the environment vars envs = {} -- cgit v1.2.3