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)) {
|
if ($this->gitUtil->fetchRefOrSyncMirror($url, $cachePath, $ref) && is_dir($cachePath)) {
|
||||||
$this->cachedPackages[$package->getId()][$ref] = true;
|
$this->cachedPackages[$package->getId()][$ref] = true;
|
||||||
}
|
}
|
||||||
} else {
|
} elseif (null === $gitVersion) {
|
||||||
if (null === GitUtil::getVersion($this->process)) {
|
|
||||||
throw new \RuntimeException('git was not found in your PATH, skipping source download');
|
throw new \RuntimeException('git was not found in your PATH, skipping source download');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
|
|
|
@ -20,6 +20,8 @@ use Composer\IO\IOInterface;
|
||||||
*/
|
*/
|
||||||
class Hg
|
class Hg
|
||||||
{
|
{
|
||||||
|
private static $version = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Composer\IO\IOInterface
|
* @var \Composer\IO\IOInterface
|
||||||
*/
|
*/
|
||||||
|
@ -90,7 +92,7 @@ class Hg
|
||||||
{
|
{
|
||||||
if (false === self::$version) {
|
if (false === self::$version) {
|
||||||
self::$version = null;
|
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];
|
self::$version = $matches[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue