@@ -206,14 +206,12 @@ export const runAll = async (
206
206
title : `${ task . pattern } ${ dim (
207
207
` — ${ fileCount } ${ fileCount === 1 ? 'file' : 'files' } `
208
208
) } `,
209
- task : async ( ) =>
210
- new Listr ( subTasks , {
211
- // In sub-tasks we don't want to run concurrently
212
- // and we want to abort on errors
213
- ...listrOptions ,
214
- concurrent : false ,
215
- exitOnError : true ,
216
- } ) ,
209
+ task : async ( ctx , task ) =>
210
+ task . newListr (
211
+ subTasks ,
212
+ // Subtasks should not run in parallel, and should exit on error
213
+ { concurrent : false , exitOnError : true }
214
+ ) ,
217
215
skip : ( ) => {
218
216
// Skip task when no files matched
219
217
if ( fileCount === 0 ) {
@@ -230,7 +228,7 @@ export const runAll = async (
230
228
title :
231
229
`${ configName } ${ dim ( ` — ${ files . length } ${ files . length > 1 ? 'files' : 'file' } ` ) } ` +
232
230
( chunkCount > 1 ? dim ( ` (chunk ${ index + 1 } /${ chunkCount } )...` ) : '' ) ,
233
- task : ( ) => new Listr ( chunkListrTasks , { ... listrOptions , concurrent, exitOnError : true } ) ,
231
+ task : ( ctx , task ) => task . newListr ( chunkListrTasks , { concurrent, exitOnError : true } ) ,
234
232
skip : ( ) => {
235
233
// Skip if the first step (backup) failed
236
234
if ( ctx . errors . has ( GitError ) ) return SKIPPED_GIT_ERROR
@@ -279,7 +277,7 @@ export const runAll = async (
279
277
} ,
280
278
{
281
279
title : `Running tasks for staged files...` ,
282
- task : ( ) => new Listr ( listrTasks , { ... listrOptions , concurrent } ) ,
280
+ task : ( ctx , task ) => task . newListr ( listrTasks , { concurrent } ) ,
283
281
skip : ( ) => listrTasks . every ( ( task ) => task . skip ( ) ) ,
284
282
} ,
285
283
{
0 commit comments