Skip to content

Commit

Permalink
Alternative fix for yarn crashing e2e tests on windows machines
Browse files Browse the repository at this point in the history
  • Loading branch information
ro-savage committed May 29, 2017
1 parent 8928aa5 commit 171e8fc
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
18 changes: 14 additions & 4 deletions tasks/e2e-installs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,20 @@ root_path=$PWD
# Clear cache to avoid issues with incorrect packages being used
if hash yarnpkg 2>/dev/null
then
# AppVeyor uses old version on yarn.
# Once updated to 0.24.3 or above install can be removed.
npm install -g yarn@latest
yarnpkg cache clean
# AppVeyor uses an old version of yarn.
# Once updated to 0.24.3 or above, the workaround can be removed
# and replaced with `yarnpkg cache clean`
# Issues:
# https://github.com/yarnpkg/yarn/issues/2591
# https://github.com/appveyor/ci/issues/1576
# https://github.com/facebookincubator/create-react-app/pull/2400
# When removing workaround, you may run into
# https://github.com/facebookincubator/create-react-app/issues/2030
case "$(uname -s)" in
*CYGWIN*|MSYS*|MINGW*) yarn=yarn.cmd;;
*) yarn=yarnpkg;;
esac
$yarn cache clean
fi

if hash npm 2>/dev/null
Expand Down
18 changes: 14 additions & 4 deletions tasks/e2e-kitchensink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,20 @@ root_path=$PWD
# Clear cache to avoid issues with incorrect packages being used
if hash yarnpkg 2>/dev/null
then
# AppVeyor uses old version on yarn.
# Once updated to 0.24.3 or above install can be removed.
npm install -g yarn@latest
yarnpkg cache clean
# AppVeyor uses an old version of yarn.
# Once updated to 0.24.3 or above, the workaround can be removed
# and replaced with `yarnpkg cache clean`
# Issues:
# https://github.com/yarnpkg/yarn/issues/2591
# https://github.com/appveyor/ci/issues/1576
# https://github.com/facebookincubator/create-react-app/pull/2400
# When removing workaround, you may run into
# https://github.com/facebookincubator/create-react-app/issues/2030
case "$(uname -s)" in
*CYGWIN*|MSYS*|MINGW*) yarn=yarn.cmd;;
*) yarn=yarnpkg;;
esac
$yarn cache clean
fi

if hash npm 2>/dev/null
Expand Down
18 changes: 14 additions & 4 deletions tasks/e2e-simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,20 @@ root_path=$PWD
# Clear cache to avoid issues with incorrect packages being used
if hash yarnpkg 2>/dev/null
then
# AppVeyor uses old version on yarn.
# Once updated to 0.24.3 or above install can be removed.
npm install -g yarn@latest
yarnpkg cache clean
# AppVeyor uses an old version of yarn.
# Once updated to 0.24.3 or above, the workaround can be removed
# and replaced with `yarnpkg cache clean`
# Issues:
# https://github.com/yarnpkg/yarn/issues/2591
# https://github.com/appveyor/ci/issues/1576
# https://github.com/facebookincubator/create-react-app/pull/2400
# When removing workaround, you may run into
# https://github.com/facebookincubator/create-react-app/issues/2030
case "$(uname -s)" in
*CYGWIN*|MSYS*|MINGW*) yarn=yarn.cmd;;
*) yarn=yarnpkg;;
esac
$yarn cache clean
fi

if hash npm 2>/dev/null
Expand Down

0 comments on commit 171e8fc

Please sign in to comment.