From 812523f1abc5fdcbaa09110482d9f5709efaf968 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 10 Aug 2015 10:07:48 +0100 Subject: [PATCH] Add more debug info on cache write failure, refs #4249 --- src/Composer/Cache.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Cache.php b/src/Composer/Cache.php index e49edf649..746a31aec 100644 --- a/src/Composer/Cache.php +++ b/src/Composer/Cache.php @@ -86,6 +86,9 @@ class Cache try { return file_put_contents($this->root . $file, $contents); } catch (\ErrorException $e) { + if ($this->io->isDebug()) { + $this->io->writeError('Failed to write into cache: '.$e->getMessage().''); + } if (preg_match('{^file_put_contents\(\): Only ([0-9]+) of ([0-9]+) bytes written}', $e->getMessage(), $m)) { // Remove partial file. unlink($this->root . $file);