From 23ef8a419a8f65fee30a1acc036929ef1ee52ed5 Mon Sep 17 00:00:00 2001 From: Jerome Tamarelle Date: Wed, 25 Apr 2012 10:09:31 +0200 Subject: [PATCH] Fix var scope in HgDriver --- src/Composer/Repository/Vcs/HgDriver.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Composer/Repository/Vcs/HgDriver.php b/src/Composer/Repository/Vcs/HgDriver.php index 08f34be9a..ddfdbe69b 100644 --- a/src/Composer/Repository/Vcs/HgDriver.php +++ b/src/Composer/Repository/Vcs/HgDriver.php @@ -31,13 +31,12 @@ class HgDriver extends VcsDriver */ public function initialize() { - $this->tmpDir = $this->config->get('home') . '/cache.hg/' . preg_replace('{[^a-z0-9]}i', '-', $url) . '/'; + $this->tmpDir = $this->config->get('home') . '/cache.hg/' . preg_replace('{[^a-z0-9]}i', '-', $this->url) . '/'; - $url = escapeshellarg($this->url); 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)), $url, escapeshellarg($this->tmpDir)), $output); + $this->process->execute(sprintf('cd %s && hg clone %s %s', escapeshellarg(dirname($this->tmpDir)), escapeshellarg($this->url), escapeshellarg($this->tmpDir)), $output); } $this->getTags();