Minor fixes
parent
902174d2a7
commit
8d94e25c2f
|
@ -71,12 +71,10 @@ 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)) {
|
||||
} elseif (null === $gitVersion) {
|
||||
throw new \RuntimeException('git was not found in your PATH, skipping source download');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
|
|
@ -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…
Reference in New Issue