@@ -22,7 +22,7 @@ export const runner = async (
22
22
batch : { queue : [ ] , completed : [ ] , failed : [ ] } ,
23
23
debug : { } ,
24
24
} ;
25
- await new Listr ( tasks , {
25
+ const rootTasks = new Listr ( tasks , {
26
26
fallbackRenderer : 'verbose' ,
27
27
rendererOptions : {
28
28
collapse : false ,
@@ -34,7 +34,8 @@ export const runner = async (
34
34
: options . verbose
35
35
? 'verbose'
36
36
: 'default' ,
37
- } )
37
+ } ) ;
38
+ await rootTasks
38
39
. run ( context )
39
40
. then ( ( ctx : Context ) => {
40
41
const duration = new Date ( ) . getTime ( ) - start ;
@@ -47,6 +48,9 @@ export const runner = async (
47
48
batch . failed . forEach ( ( project , index ) => {
48
49
logger . error ( `[FAILED] ${ project } ` ) ;
49
50
} ) ;
51
+ rootTasks ?. errors . forEach ( ( error ) => {
52
+ logger . error ( `[FAILED] ${ error } ` ) ;
53
+ } ) ;
50
54
}
51
55
process . exit ( 0 ) ;
52
56
} )
@@ -59,13 +63,19 @@ export const runner = async (
59
63
if ( err ?. response ?. body ?. message ) {
60
64
logger . warning ( err . response . body . message ) ;
61
65
}
66
+ rootTasks ?. errors . forEach ( ( error ) => {
67
+ logger . warning ( error ) ;
68
+ } ) ;
62
69
process . exit ( 0 ) ;
63
70
} else {
64
71
logger . error ( `Finished (${ formatTime ( duration ) } ) with error` ) ;
65
72
logger . error ( err ) ;
66
73
if ( err ?. response ?. body ?. message ) {
67
74
logger . error ( err . response . body . message ) ;
68
75
}
76
+ rootTasks ?. errors . forEach ( ( error ) => {
77
+ logger . error ( error ) ;
78
+ } ) ;
69
79
process . exit ( 1 ) ;
70
80
}
71
81
} ) ;
0 commit comments