aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaanwj <126646+laanwj@users.noreply.github.com>2022-02-02 19:18:26 +0100
committerlaanwj <126646+laanwj@users.noreply.github.com>2022-02-02 19:24:37 +0100
commit56a0fbf8365343d73cdff2b0a0e16542294d7577 (patch)
tree90e2551bf184211f818210272f84f436eac27a74
parent219d728fcbde8c313940788838afa46c2fb88762 (diff)
parent148b33cf72033eced8a701d127e21dfe8a816ce3 (diff)
downloadbitcoin-56a0fbf8365343d73cdff2b0a0e16542294d7577.tar.xz
Merge bitcoin/bitcoin#24156: build: Replace `which` command with `command -v`
148b33cf72033eced8a701d127e21dfe8a816ce3 build: Replace `which` command with `command -v` (Hennadii Stepanov) Pull request description: On some systems the `which` command can emit messages into stderr. For example, for `debianutils 5.5-1` package in Debian Sid: ``` # which cat /usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead. /bin/cat ``` Although such messages are harmless, they could distract developers needlessly (see bitcoin/bitcoin#24056). Fixes bitcoin/bitcoin#24056. ACKs for top commit: dongcarl: Code Review ACK 148b33cf72033eced8a701d127e21dfe8a816ce3 laanwj: Code review ACK 148b33cf72033eced8a701d127e21dfe8a816ce3 Tree-SHA512: 36ee45d8831afb75a1ba6f8c8491fa5381159a2b86042140ac09037752f74e92d3e725caa793b8e97c36afe03ada0b557eede95df2bec049173c27f32ffc804a
-rw-r--r--depends/hosts/mingw32.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/depends/hosts/mingw32.mk b/depends/hosts/mingw32.mk
index 92fd1b81bf..2f370d2b87 100644
--- a/depends/hosts/mingw32.mk
+++ b/depends/hosts/mingw32.mk
@@ -1,4 +1,4 @@
-ifneq ($(shell which $(host)-g++-posix),)
+ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),)
mingw32_CXX := $(host)-g++-posix
endif