From 33badac0a85c950fb6c1d30bf2114d0ad35f4c3d Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 10 Aug 2015 00:57:13 +0100 Subject: [PATCH] Include full error message in debug mode --- src/Composer/Downloader/ArchiveDownloader.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Composer/Downloader/ArchiveDownloader.php b/src/Composer/Downloader/ArchiveDownloader.php index 4f41285c8..f42b82872 100644 --- a/src/Composer/Downloader/ArchiveDownloader.php +++ b/src/Composer/Downloader/ArchiveDownloader.php @@ -77,7 +77,11 @@ abstract class ArchiveDownloader extends FileDownloader // retry downloading if we have an invalid zip file if ($retries && $e instanceof \UnexpectedValueException && class_exists('ZipArchive') && $e->getCode() === \ZipArchive::ER_NOZIP) { - $this->io->writeError(' Invalid zip file, retrying...'); + if ($this->io->isDebug()) { + $this->io->writeError(' Invalid zip file ('.$e->getMessage().'), retrying...'); + } else { + $this->io->writeError(' Invalid zip file, retrying...'); + } usleep(500000); continue; }