Skip to content

Commit

Permalink
CLI: Use shutil.which to detect gmake, instead of OS check.
Browse files Browse the repository at this point in the history
  • Loading branch information
petejohanson authored and jakobaa committed Jul 7, 2020
1 parent dff2c2a commit 7015526
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/python/qmk/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import platform
import subprocess
import shlex
import shutil

import qmk.keymap

Expand All @@ -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)
Expand Down

0 comments on commit 7015526

Please sign in to comment.