diff --git a/hack/deploy.sh b/hack/deploy.sh
index 69f23159d..51289cd2b 100755
--- a/hack/deploy.sh
+++ b/hack/deploy.sh
@@ -72,7 +72,7 @@ for namespace in ${namespaces[@]}; do
     fi
 done
 
-if [ "${CMD}" == "oc" ]; then
+if [ "${IS_OPENSHIFT}" == "true" ]; then
     # Switch project to kubevirt-hyperconverged
     oc project "${HCO_NAMESPACE}"
 else