diff --git a/scripts/build-and-test-macos14-container.sh b/scripts/build-and-test-macos14-container.sh
index 4581c6c..85e085a 100644
--- a/scripts/build-and-test-macos14-container.sh
+++ b/scripts/build-and-test-macos14-container.sh
@@ -7,10 +7,10 @@ eval "$(${HOMEBREW_HOME}/bin/brew shellenv)"
 
 brew install podman
 
-case ${BUILD_MODE}
-    debug)      build_mode=
-    release)    build_mode=--release
-    *)          echo "Error: BUILD_MODE=$BUILD_MODE" >2  &&  exit 1
+case ${BUILD_MODE} in
+    debug)      build_mode= ;;
+    release)    build_mode=--release ;;
+    *)          echo "Error: BUILD_MODE=$BUILD_MODE" >2  &&  exit 1 ;;
 esac
 
 podman machine init
diff --git a/scripts/build-and-test-macos14-native.sh b/scripts/build-and-test-macos14-native.sh
index 0d72203..001b92e 100644
--- a/scripts/build-and-test-macos14-native.sh
+++ b/scripts/build-and-test-macos14-native.sh
@@ -32,10 +32,10 @@ export HOMEBREW_HOME
 export LLVM_HOME
 export PYTHON_VENV_PATH
 
-case ${BUILD_MODE}
-    debug)      build_mode=
-    release)    build_mode=--release
-    *)          echo "Error: BUILD_MODE=$BUILD_MODE" >2  &&  exit 1
+case ${BUILD_MODE} in
+    debug)      build_mode= ;;
+    release)    build_mode=--release ;;
+    *)          echo "Error: BUILD_MODE=$BUILD_MODE" >2  &&  exit 1 ;;
 esac
 
 cargo build --verbose ${BUILD_MODE}