superfile: 1.1.6 -> 1.1.7 (#371308)
[NixPkgs.git] / pkgs / build-support / node / fetch-yarn-deps / yarn-build-hook.sh
blob947aa1736b6f7798107ef809e6bde2ef3f3e4664
1 yarnBuildHook() {
2 runHook preBuild
3 echo "Executing yarnBuildHook"
5 if [ -z "${yarnBuildScript-}" ]; then
6 yarnBuildScript="build"
7 fi
9 if ! type node > /dev/null 2>&1 ; then
10 echo yarnConfigHook WARNING: a node interpreter was not added to the \
11 build, and is probably required to run \'yarn $yarnBuildHook\'. \
12 A common symptom of this is getting \'command not found\' errors \
13 for Nodejs related tools.
16 yarn --offline "$yarnBuildScript" $yarnBuildFlags
18 echo "finished yarnBuildHook"
19 runHook postBuild
22 if [[ -z "${dontYarnBuild-}" && -z "${buildPhase-}" ]]; then
23 buildPhase=yarnBuildHook