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
committerAntoine du Hamel <duhamelantoine1995@gmail.com>2020-11-19 21:33:28 +0300
commit2d167f0dc785f68272d9f7f8a5ad8e64fc71cc70 (patch)
tree1b97b3fe664e96170464d9a84d41c422a1406420 /Makefile
parent3e0194e88e8d61416ef1c46ff03b348294f3d868 (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 7db5b3320f6..6379f06a2e0 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; \
@@ -898,7 +898,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)
@@ -1383,7 +1383,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