From 915b130093ebc43a3f5cbb77fdb3d1b4457e59a2 Mon Sep 17 00:00:00 2001 From: Rory Hunter Date: Mon, 13 Feb 2017 14:44:20 +0000 Subject: [PATCH] Make node version check more robust in e2e.sh (#1295) --- tasks/e2e-simple.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index 24b5ad85eef..0ba34a8064e 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 ''`