diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 27cfc6f26e793ad939c07f40055982c87652f4d9..6ec500984ef13d8cb8ab4ab02fd30d6bada6869f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -41,7 +41,7 @@ deploy-build-environment:
     # when build job finishes get the logs
     - oc logs jobs/simplejob${CI_PIPELINE_ID} | tee log.txt
     # if spack install has failed, fail the pipeline
-    - if [ $(cat log.txt |grep "Error:"|wc -l) -gt 0 ]; then exit 1;fi;
+    - if [ $(cat log.txt |grep "Error:"|wc -l) -gt 1 ]; then exit 1;fi;
     # delete the job from OpenShift as we have the logs here
     #- oc delete job simplejob${CI_PIPELINE_ID} || true
   tags: