depot/third_party/nixpkgs/pkgs/build-support/node/fetch-yarn-deps/yarn-build-hook.sh
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

24 lines
689 B
Bash

yarnBuildHook() {
runHook preBuild
echo "Executing yarnBuildHook"
if [ -z "${yarnBuildScript-}" ]; then
yarnBuildScript="build"
fi
if ! type node > /dev/null 2>&1 ; then
echo yarnConfigHook WARNING: a node interpreter was not added to the \
build, and is probably required to run \'yarn $yarnBuildHook\'. \
A common symptom of this is getting \'command not found\' errors \
for Nodejs related tools.
fi
yarn --offline "$yarnBuildScript" $yarnBuildFlags
echo "finished yarnBuildHook"
runHook postBuild
}
if [[ -z "${dontYarnBuild-}" && -z "${buildPhase-}" ]]; then
buildPhase=yarnBuildHook
fi