parent
eeff1c79ba
commit
39981a0e2b
|
@ -67,7 +67,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
|
|||
|
||||
GitUtil::cleanEnv();
|
||||
|
||||
$cachePath = $this->config->get('cache-vcs-dir').'/'.Preg::replace('{[^a-z0-9.]}i', '-', $url).'/';
|
||||
$cachePath = $this->config->get('cache-vcs-dir').'/'.Preg::replace('{[^a-z0-9.]}i', '-', Url::sanitize($url)).'/';
|
||||
$gitVersion = GitUtil::getVersion($this->process);
|
||||
|
||||
// --dissociate option is only available since git 2.3.0-rc0
|
||||
|
@ -92,7 +92,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
|
|||
{
|
||||
GitUtil::cleanEnv();
|
||||
$path = $this->normalizePath($path);
|
||||
$cachePath = $this->config->get('cache-vcs-dir').'/'.Preg::replace('{[^a-z0-9.]}i', '-', $url).'/';
|
||||
$cachePath = $this->config->get('cache-vcs-dir').'/'.Preg::replace('{[^a-z0-9.]}i', '-', Url::sanitize($url)).'/';
|
||||
$ref = $package->getSourceReference();
|
||||
$flag = Platform::isWindows() ? '/D ' : '';
|
||||
|
||||
|
@ -161,7 +161,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
|
|||
throw new \RuntimeException('The .git directory is missing from '.$path.', see https://getcomposer.org/commit-deps for more information');
|
||||
}
|
||||
|
||||
$cachePath = $this->config->get('cache-vcs-dir').'/'.Preg::replace('{[^a-z0-9.]}i', '-', $url).'/';
|
||||
$cachePath = $this->config->get('cache-vcs-dir').'/'.Preg::replace('{[^a-z0-9.]}i', '-', Url::sanitize($url)).'/';
|
||||
$ref = $target->getSourceReference();
|
||||
|
||||
if (!empty($this->cachedPackages[$target->getId()][$ref])) {
|
||||
|
|
|
@ -52,7 +52,7 @@ class GitDriver extends VcsDriver
|
|||
throw new \RuntimeException('GitDriver requires a usable cache directory, and it looks like you set it to be disabled');
|
||||
}
|
||||
|
||||
$this->repoDir = $this->config->get('cache-vcs-dir') . '/' . Preg::replace('{[^a-z0-9.]}i', '-', $this->url) . '/';
|
||||
$this->repoDir = $this->config->get('cache-vcs-dir') . '/' . Preg::replace('{[^a-z0-9.]}i', '-', Url::sanitize($this->url)) . '/';
|
||||
|
||||
GitUtil::cleanEnv();
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ use Composer\Util\Hg as HgUtils;
|
|||
use Composer\Util\ProcessExecutor;
|
||||
use Composer\Util\Filesystem;
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Util\Url;
|
||||
|
||||
/**
|
||||
* @author Per Bernhardt <plb@webfactory.de>
|
||||
|
@ -47,7 +48,7 @@ class HgDriver extends VcsDriver
|
|||
}
|
||||
|
||||
$cacheDir = $this->config->get('cache-vcs-dir');
|
||||
$this->repoDir = $cacheDir . '/' . Preg::replace('{[^a-z0-9]}i', '-', $this->url) . '/';
|
||||
$this->repoDir = $cacheDir . '/' . Preg::replace('{[^a-z0-9]}i', '-', Url::sanitize($this->url)) . '/';
|
||||
|
||||
$fs = new Filesystem();
|
||||
$fs->ensureDirectoryExists($cacheDir);
|
||||
|
|
Loading…
Reference in New Issue