From c49b407a7d58c6d4c2a17f910cd3c0fc6c4942b3 Mon Sep 17 00:00:00 2001 From: Joshua Graham Date: Mon, 7 Jan 2019 18:42:23 +1100 Subject: [PATCH] Print extra verbose output for download errors to composer command if -v is specified. --- src/PrestissimoFileFetcher.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PrestissimoFileFetcher.php b/src/PrestissimoFileFetcher.php index 30b7c23..34f4797 100644 --- a/src/PrestissimoFileFetcher.php +++ b/src/PrestissimoFileFetcher.php @@ -80,7 +80,9 @@ protected function fetchWithPrestissimo($version, $destination, $override) { $urls = array_keys($errors); if ($urls) { - throw new \Exception('Failed to download ' . implode(", ", $urls)); + // Print the exact errors if verbose mode is turned on. + $url_error_list = $this->io->isVerbose() ? print_r($errors, TRUE) : implode(", ", $urls); + throw new \Exception('Failed to download ' . $url_error_list); } }