diff --git a/setup.sh b/setup.sh
index a724e1ed0a10fb3fdeaa1f9f39796fac3bb75ca4..d5ce3566a19dfa0f01f08801962dc4c277022cea 100755
--- a/setup.sh
+++ b/setup.sh
@@ -1653,7 +1653,7 @@ function waInstall() {
 # Name: 'waEnsureOnPath'
 # Role: Ensures that $BIN_PATH is on $PATH.
 function waEnsureOnPath() {
-    if [[ !":$PATH:" =~ *":$BIN_PATH:"* ]]; then
+    if [[ ":$PATH:" != *":$BIN_PATH:"* ]]; then
         echo -e "${WARNING_TEXT}[WARNING]${CLEAR_TEXT} It seems like '${BIN_PATH}' is not on PATH."
         echo -e "${WARNING_TEXT}[WARNING]${CLEAR_TEXT} You can add it by running:"
         # shellcheck disable=SC2086