Skip to content

Commit

Permalink
Add support for sourcing binaries despite the bin proxy being present…
Browse files Browse the repository at this point in the history
…, take 2
  • Loading branch information
Seldaek committed Jan 7, 2022
1 parent 6dea58c commit 24b62a1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Composer/Installer/BinaryInstaller.php
Expand Up @@ -422,6 +422,15 @@ public function url_stat(\$path, \$flags)
export COMPOSER_BIN_DIR=\$(cd "\${self%[/\\\\]*}" > /dev/null; pwd)
# If bash is sourcing this file, we have to source the target as well
bashSource="\$BASH_SOURCE"
if [ -n "\$bashSource" ]; then
if [ "\$bashSource" != "\$0" ]; then
source "\${dir}/$binFile" "\$@"
return
fi
fi
"\${dir}/$binFile" "\$@"
PROXY;
Expand Down

0 comments on commit 24b62a1

Please sign in to comment.