1
0
Fork 0

Revert "Fix support for .jar binaries, fixes #10426"

This reverts commit fa65804c99.
pull/10430/head
Jordi Boggiano 2022-01-04 16:19:29 +01:00
parent fa65804c99
commit 8473592eda
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 11 deletions

View File

@ -158,10 +158,6 @@ class BinaryInstaller
return trim($match[1]); return trim($match[1]);
} }
if (substr($bin, -4) === '.jar') {
return 'java -jar ';
}
return 'php'; return 'php';
} }
@ -228,7 +224,7 @@ class BinaryInstaller
$binPath = $this->filesystem->findShortestPath($link, $bin); $binPath = $this->filesystem->findShortestPath($link, $bin);
$caller = self::determineBinaryCaller($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 // to ensure that _composer_autoload_path gets defined, instead
// of running the binary directly // of running the binary directly
if ($caller === 'php') { if ($caller === 'php') {
@ -398,11 +394,6 @@ include $binPathExported;
PROXY; PROXY;
} }
$caller = '';
if (substr($bin, -4) === '.jar') {
$caller = 'java -jar ';
}
return <<<PROXY return <<<PROXY
#!/usr/bin/env sh #!/usr/bin/env sh
@ -424,7 +415,7 @@ fi
export COMPOSER_BIN_DIR=\$(cd "\${self%[/\\\\]*}" > /dev/null; pwd) export COMPOSER_BIN_DIR=\$(cd "\${self%[/\\\\]*}" > /dev/null; pwd)
$caller"\${dir}/$binFile" "\$@" "\${dir}/$binFile" "\$@"
PROXY; PROXY;
} }