Fix support for read-only caches where the filesystem is not writable (fixes #10906)
parent
143e42269a
commit
f8324e0524
|
@ -1,5 +1,6 @@
|
||||||
### [2.2.15] 2022-07-01
|
### [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 type error when using `allow-plugins: true` (#10909)
|
||||||
* Fixed @putenv scripts receiving arguments passed to the command (#10846)
|
* Fixed @putenv scripts receiving arguments passed to the command (#10846)
|
||||||
* Fixed support for spaces in paths with binary proxies on Windows (#10836)
|
* Fixed support for spaces in paths with binary proxies on Windows (#10836)
|
||||||
|
|
|
@ -98,8 +98,11 @@ class Cache
|
||||||
$this->enabled = true;
|
$this->enabled = true;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(!is_dir($this->root) && !Silencer::call('mkdir', $this->root, 0777, true))
|
!$this->readOnly
|
||||||
|| !is_writable($this->root)
|
&& (
|
||||||
|
(!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->io->writeError('<warning>Cannot create cache directory ' . $this->root . ', or directory is not writable. Proceeding without cache</warning>');
|
||||||
$this->enabled = false;
|
$this->enabled = false;
|
||||||
|
|
Loading…
Reference in New Issue