Skip to content

Commit 7cee94a

Browse files
authored
Enable configurability of the Drush cache directory. (#3597)
1 parent 05ba561 commit 7cee94a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

examples/example.drush.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ drush:
7171
- '${env.home}/.drush/sites'
7272
- /etc/drush/sites
7373

74+
# Specify a folder where Drush should store its file based caches. If unspecified, defaults to $HOME/.drush.
75+
cache-directory: /tmp/.drush
76+
7477
# This section is for setting global options.
7578
options:
7679
# Specify the base_url that should be used when generating links.

src/Config/DrushConfig.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function tmp()
3939
public function cache()
4040
{
4141
$candidates = [
42+
$this->get('drush.paths.cache-directory'),
4243
Path::join($this->home(), '.drush/cache'),
4344
Path::join($this->tmp(), 'drush-' . $this->user() . '/cache'),
4445
];

0 commit comments

Comments
 (0)