~ruther/qmk_firmware

6fb048fdafe58897f64efa8c4b9455bbcb992110 — Pete Johanson 5 years ago 06b571a
CLI: Use `shutil.which` to detect gmake, instead of OS check.
1 files changed, 2 insertions(+), 5 deletions(-)

M lib/python/qmk/commands.py
M lib/python/qmk/commands.py => lib/python/qmk/commands.py +2 -5
@@ 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)