Skip to content

Commit f18288f

Browse files
Error exit code for clear command (13.x) (#55355)
1 parent cb3f391 commit f18288f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Illuminate/Cache/Console/ClearCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function __construct(CacheManager $cache, Filesystem $files)
5757
/**
5858
* Execute the console command.
5959
*
60-
* @return void
60+
* @return int|null
6161
*/
6262
public function handle()
6363
{
@@ -70,7 +70,9 @@ public function handle()
7070
$this->flushFacades();
7171

7272
if (! $successful) {
73-
return $this->components->error('Failed to clear cache. Make sure you have the appropriate permissions.');
73+
$this->components->error('Failed to clear cache. Make sure you have the appropriate permissions.');
74+
75+
return 1;
7476
}
7577

7678
$this->laravel['events']->dispatch(

0 commit comments

Comments
 (0)