Make sure getRepoConfig is only called on VcsRepos, refs #4700
parent
f874842535
commit
5dbc8fa30b
|
@ -14,6 +14,7 @@ namespace Composer\Downloader;
|
||||||
|
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Util\Svn as SvnUtil;
|
use Composer\Util\Svn as SvnUtil;
|
||||||
|
use Composer\Repository\VcsRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Ben Bieker <mail@ben-bieker.de>
|
* @author Ben Bieker <mail@ben-bieker.de>
|
||||||
|
@ -31,9 +32,12 @@ class SvnDownloader extends VcsDownloader
|
||||||
SvnUtil::cleanEnv();
|
SvnUtil::cleanEnv();
|
||||||
$ref = $package->getSourceReference();
|
$ref = $package->getSourceReference();
|
||||||
|
|
||||||
$repoConfig = $package->getRepository()->getRepoConfig();
|
$repo = $package->getRepository();
|
||||||
if (array_key_exists('svn-cache-credentials', $repoConfig)) {
|
if ($repo instanceof VcsRepository) {
|
||||||
$this->cacheCredentials = (bool) $repoConfig['svn-cache-credentials'];
|
$repoConfig = $repo->getRepoConfig();
|
||||||
|
if (array_key_exists('svn-cache-credentials', $repoConfig)) {
|
||||||
|
$this->cacheCredentials = (bool) $repoConfig['svn-cache-credentials'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->io->writeError(" Checking out ".$package->getSourceReference());
|
$this->io->writeError(" Checking out ".$package->getSourceReference());
|
||||||
|
|
Loading…
Reference in New Issue