diff --git a/src/Composer/Command/SelfUpdateCommand.php b/src/Composer/Command/SelfUpdateCommand.php index cb8a6551d..360442a1c 100644 --- a/src/Composer/Command/SelfUpdateCommand.php +++ b/src/Composer/Command/SelfUpdateCommand.php @@ -213,7 +213,7 @@ EOT return 0; } - $tempFilename = $tmpDir . '/' . basename($localFilename, '.phar').'-temp.phar'; + $tempFilename = $tmpDir . '/' . basename($localFilename, '.phar').'-temp'.rand(0, 10000000).'.phar'; $backupFile = sprintf( '%s/%s-%s%s', $rollbackDir,