From 8473592eda00a3feab76df659910fe43ea77d279 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 4 Jan 2022 16:19:29 +0100 Subject: [PATCH] Revert "Fix support for .jar binaries, fixes #10426" This reverts commit fa65804c994cd6218f4ce4ec8e2d8a4ca6d097db. --- src/Composer/Installer/BinaryInstaller.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Composer/Installer/BinaryInstaller.php b/src/Composer/Installer/BinaryInstaller.php index a057c5517..ec0fbd337 100644 --- a/src/Composer/Installer/BinaryInstaller.php +++ b/src/Composer/Installer/BinaryInstaller.php @@ -158,10 +158,6 @@ class BinaryInstaller return trim($match[1]); } - if (substr($bin, -4) === '.jar') { - return 'java -jar '; - } - return 'php'; } @@ -228,7 +224,7 @@ class BinaryInstaller $binPath = $this->filesystem->findShortestPath($link, $bin); $caller = self::determineBinaryCaller($bin); - // if the target is a php file, we run the unixy proxy file (a php script in this case) + // if the target is a php file, we run the unixy proxy file // to ensure that _composer_autoload_path gets defined, instead // of running the binary directly if ($caller === 'php') { @@ -398,11 +394,6 @@ include $binPathExported; PROXY; } - $caller = ''; - if (substr($bin, -4) === '.jar') { - $caller = 'java -jar '; - } - return << /dev/null; pwd) -$caller"\${dir}/$binFile" "\$@" +"\${dir}/$binFile" "\$@" PROXY; }