# Ensure JavaScript development dependencies are installed.
yarn --version
yarn >/dev/null
# Check all files for spelling in one go for better performance.
if[[$CSPELL_DICTIONARY_FILE_CHANGED=="1"]];then
printf"\nRunning spellcheck on *all* files.\n"
yarn run spellcheck:core --no-must-find-files--no-progress
if["$?"-ne"0"];then
if["$SKIPJS"!="1"];then
printf"Drupal's JavaScript development dependencies are not installed or cannot be resolved. Run 'yarn install' inside the core directory, or 'yarn check -s' to list other errors.\n"
exit 1;
else
printf"JavaScript development dependencies are not installed; these checks will be skipped.\n"
fi
else
# Check all files for spelling in one go for better performance. We pipe the
# list files in so we obey the globs set on the spellcheck:core command in
# core/package.json.
echo"${ABS_FILES}" | tr' ''\n' | yarn run spellcheck:core --no-must-find-files--file-list stdin
yarn >/dev/null
fi
if["$?"-ne"0"];then
# If there are failures set the status to a number other than 0.
FINAL_STATUS=1
printf"\nCSpell: ${red}failed${reset}\n"
else
printf"\nCSpell: ${green}passed${reset}\n"
if[[$SKIPJS!="1"]];then
# Check all files for spelling in one go for better performance.
if[[$CSPELL_DICTIONARY_FILE_CHANGED=="1"]];then
printf"\nRunning spellcheck on *all* files.\n"
yarn run spellcheck:core --no-must-find-files--no-progress
else
# Check all files for spelling in one go for better performance. We pipe the
# list files in so we obey the globs set on the spellcheck:core command in
# core/package.json.
echo"${ABS_FILES}" | tr' ''\n' | yarn run spellcheck:core --no-must-find-files--file-list stdin
fi
if["$?"-ne"0"];then
# If there are failures set the status to a number other than 0.
FINAL_STATUS=1
printf"\nCSpell: ${red}failed${reset}\n"
else
printf"\nCSpell: ${green}passed${reset}\n"
fi
fi
cd"$TOP_LEVEL"
# Add a separator line to make the output easier to read.