diff options
author | Pete Johanson <peter@peterjohanson.com> | 2020-04-13 16:44:27 +0000 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2020-04-13 10:48:27 -0700 |
commit | 6fb048fdafe58897f64efa8c4b9455bbcb992110 (patch) | |
tree | efb1d542d362d17df471b86963c2a6787c2e7614 /lib/python | |
parent | 06b571aa53940b278e4359136e4b7d78cf4594f9 (diff) | |
download | qmk_firmware-6fb048fdafe58897f64efa8c4b9455bbcb992110.tar.gz qmk_firmware-6fb048fdafe58897f64efa8c4b9455bbcb992110.zip |
CLI: Use `shutil.which` to detect gmake, instead of OS check.
Diffstat (limited to 'lib/python')
-rw-r--r-- | lib/python/qmk/commands.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 1fdca19437..5d2a03c9a8 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -5,6 +5,7 @@ import os import platform import subprocess import shlex +import shutil import qmk.keymap @@ -28,11 +29,7 @@ def create_make_command(keyboard, keymap, target=None): A command that can be run to make the specified keyboard and keymap """ make_args = [keyboard, keymap] - make_cmd = 'make' - - platform_id = platform.platform().lower() - if 'freebsd' in platform_id: - make_cmd = 'gmake' + make_cmd = 'gmake' if shutil.which('gmake') else 'make' if target: make_args.append(target) |