diff --git a/doc/macos-ci-install/update-ci.sh b/doc/macos-ci-install/update-ci.sh
index 4ec822756c7102c687e7ba15b09a2c355f24e482..27d0a34543bafb9f1f49c826ddf2ec0474cc6e23 100644
--- a/doc/macos-ci-install/update-ci.sh
+++ b/doc/macos-ci-install/update-ci.sh
@@ -2,9 +2,10 @@
 
 # Update CI installation
 echo "Updating homebrew..."
-brew update
-brew upgrade
-brew cleanup
+brew=/usr/local/bin/brew
+${brew} update
+${brew} upgrade
+${brew} cleanup
 
 echo "Updating python packages..."
 pip=/usr/local/bin/pip3