1
0
Fork 0

Minor fixes

pull/9702/head
Jordi Boggiano 2021-02-10 11:27:21 +01:00
parent 902174d2a7
commit 8d94e25c2f
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 5 additions and 5 deletions

View File

@ -71,10 +71,8 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
if ($this->gitUtil->fetchRefOrSyncMirror($url, $cachePath, $ref) && is_dir($cachePath)) {
$this->cachedPackages[$package->getId()][$ref] = true;
}
} else {
if (null === GitUtil::getVersion($this->process)) {
throw new \RuntimeException('git was not found in your PATH, skipping source download');
}
} elseif (null === $gitVersion) {
throw new \RuntimeException('git was not found in your PATH, skipping source download');
}
}

View File

@ -20,6 +20,8 @@ use Composer\IO\IOInterface;
*/
class Hg
{
private static $version = false;
/**
* @var \Composer\IO\IOInterface
*/
@ -90,7 +92,7 @@ class Hg
{
if (false === self::$version) {
self::$version = null;
if (0 === $this->process->execute('hg --version', $output) && preg_match('/version (\d+(?:\.\d+)+)/m', $output, $matches)) {
if (0 === $process->execute('hg --version', $output) && preg_match('/version (\d+(?:\.\d+)+)/m', $output, $matches)) {
self::$version = $matches[1];
}
}