From 3c6fba9a280eadc2a0ce0773506a650462ecd361 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 27 Feb 2017 10:46:42 -0500 Subject: [PATCH] Fix e2e when used with cold cache (#1667) Resolves #1666 # Conflicts: # tasks/e2e-simple.sh --- tasks/e2e-simple.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index b5cc1a426e2..7996752e7d3 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -65,7 +65,12 @@ set -x cd .. root_path=$PWD + +# Prevent lerna bootstrap, we only want top-level dependencies +cp package.json package.json.bak +grep -v "lerna bootstrap" package.json > temp && mv temp package.json npm install +mv package.json.bak package.json # 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 ]] @@ -75,6 +80,11 @@ then [[ $err_output =~ You\ are\ running\ Node ]] && exit 0 || exit 1 fi +# Still use npm install instead of directly calling lerna bootstrap to test +# postinstall script functionality (one npm install should result in a working +# project) +npm install + if [ "$USE_YARN" = "yes" ] then # Install Yarn so that the test can use it to install packages.