summaryrefslogtreecommitdiff
path: root/src/corefx
diff options
context:
space:
mode:
authorJürgen Hötzel <juergen@hoetzel.info>2017-01-06 01:15:49 +0100
committerJan Vorlicek <janvorli@microsoft.com>2017-01-06 01:15:49 +0100
commit7f8557fb17c58a093bf54bd17e965b9181bba772 (patch)
tree95b32f51004af7006b1ce7105187f1821e578fcb /src/corefx
parent1ba20a12ef18140d0ee1867fe5b0c0106bdbaf57 (diff)
downloadcoreclr-7f8557fb17c58a093bf54bd17e965b9181bba772.tar.gz
coreclr-7f8557fb17c58a093bf54bd17e965b9181bba772.tar.bz2
coreclr-7f8557fb17c58a093bf54bd17e965b9181bba772.zip
Use POSIX "command" instead of non-standard "which" (#8823)
GNU which might not be installed on a minimal GNU/Linux installation. Refs #6994 and #7025.
Diffstat (limited to 'src/corefx')
-rwxr-xr-xsrc/corefx/format-code.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corefx/format-code.sh b/src/corefx/format-code.sh
index 3d0cfcc93c..c0898f2125 100755
--- a/src/corefx/format-code.sh
+++ b/src/corefx/format-code.sh
@@ -2,10 +2,10 @@
# OS X names clang-format as clang-format; Ubuntu uses
# clang-format-version so check for the right one
-if which "clang-format-3.6" > /dev/null 2>&1 ; then
- export CF="$(which clang-format-3.6)"
-elif which "clang-format" > /dev/null 2>&1 ; then
- export CF="$(which clang-format)"
+if command -v "clang-format-3.6" > /dev/null; then
+ export CF="$(command -v clang-format-3.6)"
+elif command -v "clang-format" > /dev/null; then
+ export CF="$(command -v clang-format)"
else
echo "Unable to find clang-format"
exit 1