GeezerVison is showing github.com — build: replace which with command -v · nodejs/node@699bb34
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/linters.yml +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
24 | 24 | - name: Environment Information |
25 | 25 | run: npx envinfo |
26 | 26 | - name: Lint addon docs |
27 | | - run: NODE=$(which node) make lint-addon-docs |
| 27 | + run: NODE=$(command -v node) make lint-addon-docs |
28 | 28 | lint-cpp: |
29 | 29 | runs-on: ubuntu-latest |
30 | 30 | steps: |
|
50 | 50 | - name: Lint docs |
51 | 51 | run: | |
52 | 52 | echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json" |
53 | | - NODE=$(which node) make lint-md |
| 53 | + NODE=$(command -v node) make lint-md |
54 | 54 | lint-js: |
55 | 55 | runs-on: ubuntu-latest |
56 | 56 | steps: |
|
62 | 62 | - name: Environment Information |
63 | 63 | run: npx envinfo |
64 | 64 | - name: Lint JavaScript files |
65 | | - run: NODE=$(which node) make lint-js |
| 65 | + run: NODE=$(command -v node) make lint-js |
66 | 66 | lint-py: |
67 | 67 | runs-on: ubuntu-latest |
68 | 68 | steps: |
|
76 | 76 | - name: Lint Python |
77 | 77 | run: | |
78 | 78 | make lint-py-build || true |
79 | | - NODE=$(which node) make lint-py |
| 79 | + NODE=$(command -v node) make lint-py |
80 | 80 |
|
81 | 81 | lint-codeowners: |
82 | 82 | runs-on: ubuntu-latest |
|
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/misc.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
23 | 23 | - name: Environment Information |
24 | 24 | run: npx envinfo |
25 | 25 | - name: Build |
26 | | - run: NODE=$(which node) make doc-only |
| 26 | + run: NODE=$(command -v node) make doc-only |
27 | 27 | - uses: actions/upload-artifact@v1 |
28 | 28 | with: |
29 | 29 | name: docs |
|
Collapse file
Copy file name to clipboardExpand all lines: BSDmakefile +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -3,7 +3,7 @@ FLAGS=${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W} |
3 | 3 |
|
4 | 4 | all: .DEFAULT |
5 | 5 | .DEFAULT: |
6 | | - @which gmake > /dev/null 2>&1 ||\ |
| 6 | + @command -v gmake > /dev/null 2>&1 ||\ |
7 | 7 | (echo "GMake is required for node.js to build.\ |
8 | 8 | Install and try again" && exit 1) |
9 | 9 | @gmake ${.FLAGS} ${.TARGETS} |
|
Collapse file
Copy file name to clipboardExpand all lines: Makefile +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
65 | 65 | available-node = \ |
66 | 66 | if [ -x $(PWD)/$(NODE) ] && [ -e $(PWD)/$(NODE) ]; then \ |
67 | 67 | $(PWD)/$(NODE) $(1); \ |
68 | | - elif [ -x `which node` ] && [ -e `which node` ] && [ `which node` ]; then \ |
69 | | - `which node` $(1); \ |
| 68 | + elif [ -x `command -v node` ] && [ -e `command -v node` ] && [ `command -v node` ]; then \ |
| 69 | + `command -v node` $(1); \ |
70 | 70 | else \ |
71 | 71 | echo "No available node, cannot run \"node $(1)\""; \ |
72 | 72 | exit 1; \ |
@@ -915,7 +915,7 @@ BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH) |
915 | 915 | endif |
916 | 916 | BINARYTAR=$(BINARYNAME).tar |
917 | 917 | # OSX doesn't have xz installed by default, http://macpkg.sourceforge.net/ |
918 | | -HAS_XZ ?= $(shell which xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0) |
| 918 | +HAS_XZ ?= $(shell command -v xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0) |
919 | 919 | # Supply SKIP_XZ=1 to explicitly skip .tar.xz creation |
920 | 920 | SKIP_XZ ?= 0 |
921 | 921 | XZ = $(shell [ $(HAS_XZ) -eq 1 -a $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0) |
@@ -1400,7 +1400,7 @@ lint-clean: |
1400 | 1400 | $(RM) tools/.*lintstamp |
1401 | 1401 | $(RM) .eslintcache |
1402 | 1402 |
|
1403 | | -HAS_DOCKER ?= $(shell which docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0) |
| 1403 | +HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0) |
1404 | 1404 |
|
1405 | 1405 | ifeq ($(HAS_DOCKER), 1) |
1406 | 1406 | DOCKER_COMMAND ?= docker run -it -v $(PWD):/node |
|
Collapse file
Copy file name to clipboardExpand all lines: android-configure +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
50 | 50 |
|
51 | 51 | HOST_OS="linux" |
52 | 52 | HOST_ARCH="x86_64" |
53 | | -export CC_host=$(which gcc) |
54 | | -export CXX_host=$(which g++) |
| 53 | +export CC_host=$(command -v gcc) |
| 54 | +export CXX_host=$(command -v g++) |
55 | 55 |
|
56 | 56 | host_gcc_version=$($CC_host --version | grep gcc | awk '{print $NF}') |
57 | 57 | major=$(echo $host_gcc_version | awk -F . '{print $1}') |
|