Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraisinten <raisinten@gmail.com>2020-11-14 18:20:03 +0300
committerBeth Griggs <bgriggs@redhat.com>2020-12-15 23:15:24 +0300
commit699bb348d95c0b4078e542dee6efe9d54748c445 (patch)
tree5f7dc9aca9714614e04267cdebcd8290641ec533 /Makefile
parentd27e56356bb62bacf74965e441030faeeec2b24c (diff)
build: replace which with command -v
PR-URL: https://github.com/nodejs/node/pull/36118 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 1d66978ff23..93d63110ae2 100644
--- a/Makefile
+++ b/Makefile
@@ -65,8 +65,8 @@ V ?= 0
available-node = \
if [ -x $(PWD)/$(NODE) ] && [ -e $(PWD)/$(NODE) ]; then \
$(PWD)/$(NODE) $(1); \
- elif [ -x `which node` ] && [ -e `which node` ] && [ `which node` ]; then \
- `which node` $(1); \
+ elif [ -x `command -v node` ] && [ -e `command -v node` ] && [ `command -v node` ]; then \
+ `command -v node` $(1); \
else \
echo "No available node, cannot run \"node $(1)\""; \
exit 1; \
@@ -915,7 +915,7 @@ BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
endif
BINARYTAR=$(BINARYNAME).tar
# OSX doesn't have xz installed by default, http://macpkg.sourceforge.net/
-HAS_XZ ?= $(shell which xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
+HAS_XZ ?= $(shell command -v xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
# Supply SKIP_XZ=1 to explicitly skip .tar.xz creation
SKIP_XZ ?= 0
XZ = $(shell [ $(HAS_XZ) -eq 1 -a $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0)
@@ -1400,7 +1400,7 @@ lint-clean:
$(RM) tools/.*lintstamp
$(RM) .eslintcache
-HAS_DOCKER ?= $(shell which docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
+HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
ifeq ($(HAS_DOCKER), 1)
DOCKER_COMMAND ?= docker run -it -v $(PWD):/node