composer/composer — pull request #2695 by guillaumelecerf (2014-02-12 13:53:29+00:00)
Title: Fix Cache::gc() when COMPOSER_CACHE_DIR=/dev/null

If we set COMPOSER_CACHE_DIR=/dev/null, and the garbage collector
is triggered, we end up with the following error :

The "/dev/null/" directory does not exist.

This is because the Cache::gc() function does not check for Cache::enabled
and instanciate a Finder unconditionnaly.

Fix this by adding a check on Cache::enabled.