From f59d1cf6d6494900826bf80fa6dd7547d51e75d3 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Wed, 6 Dec 2023 11:46:24 +0100 Subject: [PATCH] build-support/php: prevent the creation of symlinks of `bin` ending with `.bat` --- pkgs/build-support/php/hooks/composer-install-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/php/hooks/composer-install-hook.sh b/pkgs/build-support/php/hooks/composer-install-hook.sh index 6fe1c4e5f7dd..6e7fb5d7503b 100644 --- a/pkgs/build-support/php/hooks/composer-install-hook.sh +++ b/pkgs/build-support/php/hooks/composer-install-hook.sh @@ -155,7 +155,7 @@ composerInstallInstallHook() { cp -r . "$out"/share/php/"${pname}"/ # Create symlinks for the binaries. - jq -r -c 'try .bin[]' composer.json | while read -r bin; do + jq -r -c 'try (.bin[] | select(test(".bat$")? | not) )' composer.json | while read -r bin; do mkdir -p "$out"/share/php/"${pname}" "$out"/bin makeWrapper "$out"/share/php/"${pname}"/"$bin" "$out"/bin/"$(basename "$bin")" done