From 42bb244ece82f27ccb8e9aa0e04ee7c48bcedd25 Mon Sep 17 00:00:00 2001 From: Yureka Date: Fri, 25 Apr 2025 06:51:53 +0200 Subject: [PATCH] yarn-berry.yarnBerryConfigHook: Add patchShebangs and separate rebuild step --- .../ya/yarn-berry/fetcher/yarn-berry-config-hook.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ya/yarn-berry/fetcher/yarn-berry-config-hook.sh b/pkgs/by-name/ya/yarn-berry/fetcher/yarn-berry-config-hook.sh index 65c4e3e689ad..0fda1c6e1c1a 100644 --- a/pkgs/by-name/ya/yarn-berry/fetcher/yarn-berry-config-hook.sh +++ b/pkgs/by-name/ya/yarn-berry/fetcher/yarn-berry-config-hook.sh @@ -75,7 +75,14 @@ yarnBerryConfigHook() { export npm_config_nodedir="@nodeSrc@" export npm_config_node_gyp="@nodeGyp@" - YARN_IGNORE_PATH=1 @yarn_offline@ install --inline-builds + YARN_IGNORE_PATH=1 @yarn_offline@ install --mode=skip-build + if [[ -z "${dontYarnBerryPatchShebangs-}" ]]; then + echo "Running patchShebangs in between the Link and the Build step..." + patchShebangs node_modules + fi + if ! [[ "$YARN_ENABLE_SCRIPTS" == "0" || "$YARN_ENABLE_SCRIPTS" == "false" ]]; then + YARN_IGNORE_PATH=1 @yarn_offline@ install --inline-builds + fi echo "finished yarnBerryConfigHook" }