Преглед изворни кода

Escaped git --reference argument

Luís Faceira пре 9 година
родитељ
комит
5dd35c590e
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/Composer/Downloader/GitDownloader.php

+ 1 - 1
src/Composer/Downloader/GitDownloader.php

@@ -43,7 +43,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
         GitUtil::cleanEnv();
         $path = $this->normalizePath($path);
         $cachePath = $this->config->get('cache-vcs-dir').'/'.preg_replace('{[^a-z0-9.]}i', '-', $url).'/';
-        $cacheOptions = file_exists($cachePath) ? $cacheOptions = '--reference '.$cachePath.' ' : '';
+        $cacheOptions = file_exists($cachePath) ? '--reference '.ProcessExecutor::escape($cachePath).' ' : '';
 
         $ref = $package->getSourceReference();
         $flag = Platform::isWindows() ? '/D ' : '';