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:
parent
23ef8a419a
commit
8b408449f6
1 changed files with 5 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue