Merge pull request #272448 from drupol/php/composer-builder/filter-bat

build-support/php: prevent the creation of symlinks of `bin` ending with `.bat`
This commit is contained in:
Pol Dellaiera
2023-12-12 08:11:50 +01:00
committed by GitHub
@@ -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