diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh
index 24b5ad85eefeb9b10e68dd926fe2fae45874fcb5..0ba34a8064e233939e30f16687cfc57bcae10c84 100755
--- a/tasks/e2e-simple.sh
+++ b/tasks/e2e-simple.sh
@@ -68,7 +68,7 @@ root_path=$PWD
 npm install
 
 # If the node version is < 4, the script should just give an error.
-if [ `node --version | sed -e 's/^v//' -e 's/\..\+//g'` -lt 4 ]
+if [[ `node --version | sed -e 's/^v//' -e 's/\..*//g'` -lt 4 ]]
 then
   cd $temp_app_path
   err_output=`node "$root_path"/packages/create-react-app/index.js test-node-version 2>&1 > /dev/null || echo ''`