From fc0da27d847f2b628d0cc10b0d9a581264a79126 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 10 Nov 2015 13:12:47 +0000 Subject: [PATCH] Add more debug output when writing to cache --- src/Composer/Cache.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Composer/Cache.php b/src/Composer/Cache.php index 9f9c55ba6..3ba11da1c 100644 --- a/src/Composer/Cache.php +++ b/src/Composer/Cache.php @@ -124,8 +124,10 @@ class Cache $file = preg_replace('{[^'.$this->whitelist.']}i', '-', $file); $this->filesystem->ensureDirectoryExists(dirname($this->root . $file)); - if ($this->io->isDebug()) { - $this->io->writeError('Writing '.$this->root . $file.' into cache'); + if (!file_exists($source)) { + $this->io->writeError(''.$source.' does not exist, can not write into cache'); + } elseif ($this->io->isDebug()) { + $this->io->writeError('Writing '.$this->root . $file.' into cache from '.$source); } return copy($source, $this->root . $file);