diff options
Diffstat (limited to 'src/corefx/format-code.sh')
-rwxr-xr-x | src/corefx/format-code.sh | 8 |
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 |