parent
f3b0890cf4
commit
6edabc629d
|
@ -47,8 +47,9 @@ class GitDownloader extends VcsDownloader
|
|||
$command = 'git clone --no-checkout %s %s && cd '.$flag.'%2$s && git remote add composer %1$s && git fetch composer';
|
||||
$this->io->write(" Cloning ".$ref);
|
||||
|
||||
$commandCallable = function ($url) use ($ref, $path, $command) {
|
||||
return sprintf($command, $this->shellEscapeUrl ($url), escapeshellarg($path), escapeshellarg($ref));
|
||||
$downloader = $this;
|
||||
$commandCallable = function ($url) use ($ref, $path, $command, $downloader) {
|
||||
return sprintf($command, $downloader->shellEscapeUrl ($url), escapeshellarg($path), escapeshellarg($ref));
|
||||
};
|
||||
|
||||
$this->gitUtil->runCommand($commandCallable, $url, $path, true);
|
||||
|
@ -94,8 +95,9 @@ class GitDownloader extends VcsDownloader
|
|||
$this->io->write(" Checking out ".$ref);
|
||||
$command = 'git remote set-url composer %s && git fetch composer && git fetch --tags composer';
|
||||
|
||||
$commandCallable = function ($url) use ($command) {
|
||||
return sprintf($command, $this->shellEscapeUrl ($url));
|
||||
$downloader = $this;
|
||||
$commandCallable = function ($url) use ($command, $downloader) {
|
||||
return sprintf($command, $downloader->shellEscapeUrl ($url));
|
||||
};
|
||||
|
||||
$this->gitUtil->runCommand($commandCallable, $url, $path);
|
||||
|
|
Loading…
Reference in New Issue