1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Create ~/.composer/cache.hg directory if not exists

This commit is contained in:
Jerome Tamarelle 2012-04-25 10:13:02 +02:00
parent 23ef8a419a
commit 8b408449f6

View file

@ -36,7 +36,11 @@ class HgDriver extends VcsDriver
if (is_dir($this->tmpDir)) {
$this->process->execute(sprintf('cd %s && hg pull -u', escapeshellarg($this->tmpDir)), $output);
} else {
$this->process->execute(sprintf('cd %s && hg clone %s %s', escapeshellarg(dirname($this->tmpDir)), escapeshellarg($this->url), escapeshellarg($this->tmpDir)), $output);
$dir = dirname($this->tmpDir);
if (!is_dir($dir)) {
mkdir($dir, 0777 & ~umask(), true);
}
$this->process->execute(sprintf('cd %s && hg clone %s %s', escapeshellarg($dir), escapeshellarg($this->url), escapeshellarg($this->tmpDir)), $output);
}
$this->getTags();