yarnConfigHook: apply as a postConfigure hook

This follows in this example of npmConfigHook and allows for using this
hook alongside others that may override configurePhase
This commit is contained in:
seth 2024-08-18 22:56:21 -04:00
parent da55d2e252
commit 278e1bfb89
No known key found for this signature in database
GPG Key ID: D31BD0D494BBEE86

View File

@ -1,5 +1,4 @@
yarnConfigHook(){
runHook preConfigure
echo "Executing yarnConfigHook"
# Use a constant HOME directory
@ -29,9 +28,8 @@ yarnConfigHook(){
patchShebangs node_modules
echo "finished yarnConfigHook"
runHook postConfigure
}
if [[ -z "${dontYarnInstallDeps-}" && -z "${configurePhase-}" ]]; then
configurePhase=yarnConfigHook
if [[ -z "${dontYarnInstallDeps-}" ]]; then
postConfigureHooks+=(yarnConfigHook)
fi