Minor fixes

main
Jordi Boggiano 3 years ago
parent 902174d2a7
commit 8d94e25c2f
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -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');
}
}

@ -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];
}
}

Loading…
Cancel
Save