Skip to content

Commit

Permalink
Merge pull request #175 from vtsykun/fix/empty-ref2.4
Browse files Browse the repository at this point in the history
Fix PHP exception when reference does not exist
  • Loading branch information
vtsykun authored Sep 27, 2023
2 parents 19ceba6 + 6312e6c commit 63e7c87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Service/DistManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private function downloadVCS(string $reference, Package $package, ?string $versi

$format = $this->config->getArchiveFormat();
$targetDir = $this->config->generateTargetDir($package->getName());
$fileName = $this->config->getFileName($reference, $versionName);
$fileName = $this->config->getFileName($reference, $versionName ?: self::EMPTY_VERSION_NAME);

try {
if ($path = $archiveManager->tryFromGitArchive($reference, $format, $targetDir, $fileName)) {
Expand Down

0 comments on commit 63e7c87

Please sign in to comment.