1
0
Fork 0

Copy source ref to dist ref if a custom dist info is present in non-dist-supporting drivers, fixes #12237

pull/12266/head
Jordi Boggiano 2025-01-10 09:01:18 +01:00
parent 7b1655bc62
commit 58e38b111d
No known key found for this signature in database
1 changed files with 5 additions and 0 deletions

View File

@ -443,6 +443,11 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
$data['source'] = $driver->getSource($identifier); $data['source'] = $driver->getSource($identifier);
} }
// if custom dist info is provided but does not provide a reference, copy the source reference to it
if (is_array($data['dist']) && !isset($data['dist']['reference']) && isset($data['source']['reference'])) {
$data['dist']['reference'] = $data['source']['reference'];
}
return $data; return $data;
} }