1
0
Fork 0

Adjust cache-dir docs, fixes #1667

pull/2175/head
Jordi Boggiano 2013-08-13 15:19:08 +02:00
parent eb331cbcbe
commit 565e216afb
2 changed files with 9 additions and 1 deletions

View File

@ -461,6 +461,14 @@ This file allows you to set [configuration](04-schema.md#config) and
In case global configuration matches _local_ configuration, the _local_ In case global configuration matches _local_ configuration, the _local_
configuration in the project's `composer.json` always wins. configuration in the project's `composer.json` always wins.
### COMPOSER_CACHE_DIR
The `COMPOSER_CACHE_DIR` var allows you to change the composer cache directory,
which is also configurable via the [`cache-dir`](04-schema.md#config) option.
By default it points to $COMPOSER_HOME/cache on \*nix and OSX, and
`C:\Users\<user>\AppData\Local\Composer` (or `%LOCALAPPDATA%/Composer`) on Windows.
### COMPOSER_PROCESS_TIMEOUT ### COMPOSER_PROCESS_TIMEOUT
This env var controls the time composer waits for commands (such as git This env var controls the time composer waits for commands (such as git

View File

@ -60,7 +60,7 @@ class Factory
if ($cacheDir = getenv('LOCALAPPDATA')) { if ($cacheDir = getenv('LOCALAPPDATA')) {
$cacheDir .= '/Composer'; $cacheDir .= '/Composer';
} else { } else {
$cacheDir = getenv('APPDATA') . '/Composer/cache'; $cacheDir = $home . '/cache';
} }
$cacheDir = strtr($cacheDir, '\\', '/'); $cacheDir = strtr($cacheDir, '\\', '/');
} else { } else {