diff options
author | raisinten <raisinten@gmail.com> | 2020-11-14 20:50:03 +0530 |
---|---|---|
committer | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2020-11-19 19:33:28 +0100 |
commit | 2d167f0dc785f68272d9f7f8a5ad8e64fc71cc70 (patch) | |
tree | 1b97b3fe664e96170464d9a84d41c422a1406420 /Makefile | |
parent | 3e0194e88e8d61416ef1c46ff03b348294f3d868 (diff) | |
download | node-new-2d167f0dc785f68272d9f7f8a5ad8e64fc71cc70.tar.gz |
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-- | Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |