1
0
Fork 0

Output info about downloads even with --no-progress and show when reading from cache, refs #1410

pull/1420/head
Jordi Boggiano 2012-12-13 16:54:05 +01:00
parent b8ca4e1af9
commit b34e8554d2
1 changed files with 5 additions and 0 deletions

View File

@ -96,9 +96,14 @@ class FileDownloader implements DownloaderInterface
try {
if (!$this->cache || !$this->cache->copyTo($this->getCacheKey($package), $fileName)) {
$this->rfs->copy($hostname, $processedUrl, $fileName, $this->outputProgress);
if (!$this->outputProgress) {
$this->io->write(' Downloading');
}
if ($this->cache) {
$this->cache->copyFrom($this->getCacheKey($package), $fileName);
}
} else {
$this->io->write(' Loading from cache');
}
} catch (TransportException $e) {
if (404 === $e->getCode() && 'github.com' === $hostname) {