diff --git a/src/Composer/Command/ClearCacheCommand.php b/src/Composer/Command/ClearCacheCommand.php index cf25491d3..47d139144 100644 --- a/src/Composer/Command/ClearCacheCommand.php +++ b/src/Composer/Command/ClearCacheCommand.php @@ -42,28 +42,28 @@ EOT $io = $this->getIO(); $cachePaths = array( - $config->get('cache-dir'), - $config->get('cache-files-dir'), - $config->get('cache-repo-dir'), - $config->get('cache-vcs-dir'), + 'cache-dir' => $config->get('cache-dir'), + 'cache-files-dir' => $config->get('cache-files-dir'), + 'cache-repo-dir' => $config->get('cache-repo-dir'), + 'cache-vcs-dir' => $config->get('cache-vcs-dir'), ); - foreach ($cachePaths as $cachePath) { + foreach ($cachePaths as $key => $cachePath) { $cachePath = realpath($cachePath); if (!$cachePath) { - $io->write('Cache directory does not exist.'); + $io->write("Cache directory does not exist ($key): $cachePath"); return; } $cache = new Cache($io, $cachePath); if (!$cache->isEnabled()) { - $io->write('Cache is not enabled.'); + $io->write("Cache is not enabled ($key): $cachePath"); return; } - $io->write('Clearing cache in: '.$cachePath.''); + $io->write("Clearing cache ($key): $cachePath"); $cache->gc(0, 0); } - $io->write('Cache cleared.'); + $io->write('All caches cleared.'); } }