Check for correct node/yarn versions in `scripts/run-environment-check.sh`
This commit is contained in:
parent
63c13f38ed
commit
b1a1317065
|
@ -23,8 +23,8 @@ else
|
||||||
PLATFORM=$1
|
PLATFORM=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! program_exists node || ! program_exists yarn; then
|
if ! program_version_exists node $EXPECTED_NODE_VERSION || ! program_exists yarn $EXPECTED_YARN_VERSION; then
|
||||||
echo -e "${YELLOW}********************************************************************************************"
|
echo -e "${YELLOW}**********************************************************************************************"
|
||||||
|
|
||||||
nvmrc="./.nvmrc"
|
nvmrc="./.nvmrc"
|
||||||
if [ -e "$nvmrc" ]; then
|
if [ -e "$nvmrc" ]; then
|
||||||
|
@ -32,10 +32,15 @@ if ! program_exists node || ! program_exists yarn; then
|
||||||
version_alias=$(cat "$nvmrc")
|
version_alias=$(cat "$nvmrc")
|
||||||
echo -e "Please run 'nvm use $version_alias' in the terminal and try again."
|
echo -e "Please run 'nvm use $version_alias' in the terminal and try again."
|
||||||
else
|
else
|
||||||
echo -e "Please open another console to reload the environment, and then run make setup if necessary."
|
echo -e "The current environment doesn't contain the expected versions of node and/or yarn"
|
||||||
|
echo -e " - node:\texpected\t${EXPECTED_NODE_VERSION}"
|
||||||
|
echo -e " \t\tfound\t\t$(node -v) ($(which node))"
|
||||||
|
echo -e " - yarn:\texpected\t${EXPECTED_YARN_VERSION}"
|
||||||
|
echo -e " \t\tfound\t\t$(yarn -v) ($(which yarn))"
|
||||||
|
echo -e "Please open another console to reload the environment, and then run 'make setup' if necessary."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "********************************************************************************************${NC}"
|
echo -e "**********************************************************************************************${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue