1
0
Fork 0
pull/11791/head
Jordi Boggiano 2024-01-10 13:47:26 +01:00
parent 10667db1ba
commit 3427bee1f2
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ class LockTransaction extends Transaction
if ($presentPackage->getSourceReference() && $presentPackage->getSourceType() === $package->getSourceType()) { if ($presentPackage->getSourceReference() && $presentPackage->getSourceType() === $package->getSourceType()) {
$package->setSourceDistReferences($presentPackage->getSourceReference()); $package->setSourceDistReferences($presentPackage->getSourceReference());
// if the dist url is not one of those handled gracefully by setSourceDistReferences then we should overwrite it with the old one // if the dist url is not one of those handled gracefully by setSourceDistReferences then we should overwrite it with the old one
if (!Preg::isMatch('{^https?://(?:(?:www\.)?bitbucket\.org|(api\.)?github\.com|(?:www\.)?gitlab\.com)/}i', $package->getDistUrl())) { if ($package->getDistUrl() !== null && !Preg::isMatch('{^https?://(?:(?:www\.)?bitbucket\.org|(api\.)?github\.com|(?:www\.)?gitlab\.com)/}i', $package->getDistUrl())) {
$package->setDistUrl($presentPackage->getDistUrl()); $package->setDistUrl($presentPackage->getDistUrl());
} }
$package->setDistType($presentPackage->getDistType()); $package->setDistType($presentPackage->getDistType());