diff --git a/framework/core/src/Foundation/Console/CacheClearCommand.php b/framework/core/src/Foundation/Console/CacheClearCommand.php index 85f526022..ae7c3d710 100644 --- a/framework/core/src/Foundation/Console/CacheClearCommand.php +++ b/framework/core/src/Foundation/Console/CacheClearCommand.php @@ -62,7 +62,13 @@ class CacheClearCommand extends AbstractCommand { $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; array_map('unlink', glob($storagePath.'/formatter/*'));