We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
command -v
which
1 parent f37c457 commit 89a8757Copy full SHA for 89a8757
Makefile
@@ -50,8 +50,8 @@ INSTALL_DIR := $(INSTALL) -d -p
50
INSTALL_PROGRAM := $(INSTALL) -p
51
52
# Best effort attempt to find a python interpreter, defaulting to Python 3 if
53
-# available. Fall back to just `python` if `which` is nowhere to be found.
54
-PYTHON_INTERPRETER := $(word 1,$(shell which python3 python python2 2>/dev/null) python)
+# available. Fall back to just `python`.
+PYTHON_INTERPRETER := $(word 1,$(shell command -v python3 || command -v python || command -v python2) python)
55
PYTHON ?= $(PYTHON_INTERPRETER)
56
57
export CC LD CPP INSTALL INSTALL_DATA INSTALL_DIR INSTALL_PROGRAM OBJCOPY PYTHON
0 commit comments