mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 12:43:52 +08:00
Don't fail silently on cache clear (#2756)
This commit is contained in:
parent
e4d5a328f3
commit
9a9a644c56
|
@ -62,7 +62,13 @@ class CacheClearCommand extends AbstractCommand
|
||||||
{
|
{
|
||||||
$this->info('Clearing the cache...');
|
$this->info('Clearing the cache...');
|
||||||
|
|
||||||
$this->cache->flush();
|
$succeeded = $this->cache->flush();
|
||||||
|
|
||||||
|
if (! $succeeded) {
|
||||||
|
$this->error('Could not clear contents of `storage/cache`. Please adjust file permissions and try again. This can frequently be fixed by clearing cache via the `Tools` dropdown on the Administration Dashboard page.');
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
$storagePath = $this->paths->storage;
|
$storagePath = $this->paths->storage;
|
||||||
array_map('unlink', glob($storagePath.'/formatter/*'));
|
array_map('unlink', glob($storagePath.'/formatter/*'));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user