Skip to content

Commit b558514

Browse files
committed
Make node version check more robust in e2e.sh
I noticed that when running `./tasks/e2e.sh`, the node version check was failing to execute properly due to bash complaining (version '3.2.57(1)-release' on my Mac OSX machine). Once I changed the test syntax to use '[[', I found that sed wasn't stripping the node version correctly. I verified this with: nvm use 0.10 ./tasks/e2e.sh ...which bombed out on a 'const' declaration'. It's probably down to some platform peculiarities, but good to fix them nonetheless.
1 parent c9bc6ce commit b558514

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/e2e-simple.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ root_path=$PWD
6868
npm install
6969

7070
# If the node version is < 4, the script should just give an error.
71-
if [ `node --version | sed -e 's/^v//' -e 's/\..\+//g'` -lt 4 ]
71+
if [[ `node --version | sed -e 's/^v//' -e 's/\..*//g'` -lt 4 ]]
7272
then
7373
cd $temp_app_path
7474
err_output=`node "$root_path"/packages/create-react-app/index.js test-node-version 2>&1 > /dev/null || echo ''`

0 commit comments

Comments
 (0)