diff --git a/ci/style.sh b/ci/style.sh
index a6a00171019e4db82407f1ec128ebb584294a08a..7acd128de2480f6dd9a007ec743a66e0ded30582 100644
--- a/ci/style.sh
+++ b/ci/style.sh
@@ -5,7 +5,7 @@ set -ex
 rustc ci/style.rs && ./style src
 
 if rustup component add rustfmt-preview ; then
-    which rustfmt
+    command -v rustfmt
     rustfmt -V
     cargo fmt --all -- --check
 fi