@@ -31,10 +31,16 @@ public function processTask(object $process): void
31
31
32
32
$ this ->clear ();
33
33
34
- $ description = Str::contains ($ process ->status , 'failed ' ) ?
34
+ $ status = strtolower ($ process ->status );
35
+
36
+ $ description = Str::contains ($ status , 'error ' ) ?
35
37
"<fg=red;options=bold>β</> Failed <fg=red> {$ process ->name }</> " :
36
38
"<fg=blue;options=bold>β</> Finished <fg=blue> {$ process ->name }</> " ;
37
39
40
+ $ description = Str::contains ($ status , 'cancelled ' ) ?
41
+ "<fg=yellow;options=bold>β </> Cancelled <fg=yellow> {$ process ->name }</> " :
42
+ $ description ;
43
+
38
44
$ descriptionWidth = mb_strlen (preg_replace ("/\<[\w=#\/\;,:.&,%?]+\>| \\e\[\d+m/ " , '$1 ' , $ description ) ?? '' );
39
45
40
46
$ this ->output ->write (" $ description " , false );
@@ -53,8 +59,10 @@ public function processTask(object $process): void
53
59
$ this ->output ->write (str_repeat ('<fg=gray>.</> ' , $ dots ), false );
54
60
$ this ->output ->write ("<fg=gray> {$ elapsed }</> " , false );
55
61
56
- $ this ->output ->writeln (
57
- Str::is ($ process ->status , 'finished ' ) ? ' <fg=green;options=bold>DONE</> ' : ' <fg=red;options=bold>FAIL</> '
58
- );
62
+ $ statusLabel = Str::is ($ status , 'finished ' ) ? ' <fg=green;options=bold>DONE</> ' : ' <fg=red;options=bold>FAIL</> ' ;
63
+ $ statusLabel = Str::contains ($ status , 'cancelled ' ) ?
64
+ ' <fg=yellow;options=bold>SKIP</> ' : $ statusLabel ;
65
+
66
+ $ this ->output ->writeln ($ statusLabel );
59
67
}
60
68
}
0 commit comments