|
@@ -15,6 +15,7 @@ namespace Composer\Repository\Vcs;
|
|
use Composer\Json\JsonFile;
|
|
use Composer\Json\JsonFile;
|
|
use Composer\Util\ProcessExecutor;
|
|
use Composer\Util\ProcessExecutor;
|
|
use Composer\Util\Filesystem;
|
|
use Composer\Util\Filesystem;
|
|
|
|
+use Composer\Util\Git as GitUtil;
|
|
use Composer\IO\IOInterface;
|
|
use Composer\IO\IOInterface;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -38,12 +39,8 @@ class GitDriver extends VcsDriver
|
|
} else {
|
|
} else {
|
|
$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', '-', $this->url) . '/';
|
|
|
|
|
|
- // clean up rogue git env vars in case this is running in a git hook
|
|
|
|
- putenv('GIT_DIR');
|
|
|
|
- putenv('GIT_WORK_TREE');
|
|
|
|
-
|
|
|
|
- // added in git 1.7.1, prevents prompting the user for username/password
|
|
|
|
- putenv('GIT_ASKPASS=echo');
|
|
|
|
|
|
+ $util = new GitUtil;
|
|
|
|
+ $util->cleanEnv();
|
|
|
|
|
|
$fs = new Filesystem();
|
|
$fs = new Filesystem();
|
|
$fs->ensureDirectoryExists(dirname($this->repoDir));
|
|
$fs->ensureDirectoryExists(dirname($this->repoDir));
|