Skip to content

Commit

Permalink
Try to avoid 'Unable to add newly converted phar... to the list of ph…
Browse files Browse the repository at this point in the history
…ars, a phar with that name already exists' due to https://bugs.php.net/bug.php\?id\=75101 [skip ci]
  • Loading branch information
beto-aveiga committed Jul 22, 2024
1 parent c293ed7 commit b59c82f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BinaryInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ protected function installBinary($binary, $version, $url, $sha, $hashalgo = 'sha
else {
$cacheFolder = sys_get_temp_dir() . \DIRECTORY_SEPARATOR . $binary . \DIRECTORY_SEPARATOR . $version;
}
$cacheDestination = $cacheFolder . \DIRECTORY_SEPARATOR . $fileName;
$cacheDestination = $cacheFolder. \DIRECTORY_SEPARATOR . bin2hex(random_bytes(5)) . $fileName;
$cacheExtractedBinary = $cacheFolder . \DIRECTORY_SEPARATOR . $binary;
$binDestination = $bin . \DIRECTORY_SEPARATOR . $binary;

Expand Down

0 comments on commit b59c82f

Please sign in to comment.