1
0
Fork 0

Fix support for read-only caches where the filesystem is not writable (fixes #10906)

pull/10921/head
Jordi Boggiano 2022-07-01 11:50:26 +02:00
parent 143e42269a
commit f8324e0524
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,6 @@
### [2.2.15] 2022-07-01
* Fixed support for read-only caches where the filesystem is not writable (#10906)
* Fixed type error when using `allow-plugins: true` (#10909)
* Fixed @putenv scripts receiving arguments passed to the command (#10846)
* Fixed support for spaces in paths with binary proxies on Windows (#10836)

View File

@ -98,8 +98,11 @@ class Cache
$this->enabled = true;
if (
!$this->readOnly
&& (
(!is_dir($this->root) && !Silencer::call('mkdir', $this->root, 0777, true))
|| !is_writable($this->root)
)
) {
$this->io->writeError('<warning>Cannot create cache directory ' . $this->root . ', or directory is not writable. Proceeding without cache</warning>');
$this->enabled = false;