1
0
Fork 0

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

pull/617/head
Jerome Tamarelle 2012-04-25 10:13:02 +02:00
parent 23ef8a419a
commit 8b408449f6
1 changed files with 5 additions and 1 deletions

View File

@ -36,7 +36,11 @@ class HgDriver extends VcsDriver
if (is_dir($this->tmpDir)) { if (is_dir($this->tmpDir)) {
$this->process->execute(sprintf('cd %s && hg pull -u', escapeshellarg($this->tmpDir)), $output); $this->process->execute(sprintf('cd %s && hg pull -u', escapeshellarg($this->tmpDir)), $output);
} else { } 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(); $this->getTags();