@@ -6,9 +6,9 @@ function reRunnerBuilder(runOptions) {
66 const failedByAssert = [ ]
77 let currentSessionCount = 0
88
9+ let { attemptsCount} = runOptions
910 const {
1011 stackAnalize,
11- attemptsCount,
1212 grepWord,
1313 debugProcess,
1414 reformatCommand,
@@ -50,23 +50,28 @@ function reRunnerBuilder(runOptions) {
5050 console . log ( `Attempts count is: ${ attemptsCount } ` )
5151 }
5252
53+ if ( typeof attemptsCount !== 'number' ) {
54+ console . warn ( 'attemptsCount should be a number, 2 will be used as a default' )
55+ attemptsCount = 2
56+ }
57+
5358 const failedCommands = await new Array ( attemptsCount )
5459 // create array with current length
5560 . fill ( attemptsCount )
5661 // execute run
5762 . reduce ( ( resolver , /*current*/ current , index ) => {
5863
5964 if ( debugProcess ) {
60- console . log ( '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' )
61- console . log ( `Execution number: ${ index } ` )
62- console . log ( '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' )
65+ console . info ( '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' )
66+ console . info ( `Execution number: ${ index } ` )
67+ console . info ( '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' )
6368 }
6469
6570 return resolver . then ( ( resolvedCommandsArray ) => {
6671 if ( debugProcess ) {
67- console . log ( '=========================================================================' )
68- console . log ( `Processes count: ${ resolvedCommandsArray . length } ` )
69- console . log ( '=========================================================================' )
72+ console . info ( '=========================================================================' )
73+ console . info ( `Processes count: ${ resolvedCommandsArray . length } ` )
74+ console . info ( '=========================================================================' )
7075 }
7176 return runCommandsArray ( resolvedCommandsArray , [ ] , index )
7277
0 commit comments