about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2023-12-06 11:46:24 +0100
committerPol Dellaiera <pol.dellaiera@protonmail.com>2023-12-06 11:46:24 +0100
commitf59d1cf6d6494900826bf80fa6dd7547d51e75d3 (patch)
treec78edf5176bc10a24e0e75b3489db6aa7159dbec
parentceee05a3d636a76a153a1378e7e6748ff39a2f14 (diff)
build-support/php: prevent the creation of symlinks of `bin` ending with `.bat`
-rw-r--r--pkgs/build-support/php/hooks/composer-install-hook.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/php/hooks/composer-install-hook.sh b/pkgs/build-support/php/hooks/composer-install-hook.sh
index 6fe1c4e5f7dde..6e7fb5d7503bf 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