@@ -28,35 +28,36 @@ export class Engine {
2828 console . log ( "Environment incomplete: " + this . environmentName + " (ignored)" ) ;
2929 }
3030 }
31-
32- mainloop: for ( let stepIndex = 0 ; stepIndex < this . playbook . steps . length ; stepIndex ++ ) {
33- for ( let lineIndex = 0 ; lineIndex < this . playbook . steps [ stepIndex ] . lines . length ; lineIndex ++ ) {
34- let runCommand = this . initRunCommand ( stepIndex , lineIndex ) ;
35- let foundRunnerToExecuteCommand = false ;
36- for ( let runnerIndex in this . environment . runners ) {
37- let runner = await this . getRunner ( this . environment . runners [ runnerIndex ] ) ;
38- if ( runner . supports ( this . playbook . steps [ stepIndex ] . lines [ lineIndex ] . name , this . playbook . steps [ stepIndex ] . lines [ lineIndex ] . parameters ) ) {
39- var result = new RunResult ( ) ;
40- if ( runner . commandIsSkippable ( runCommand . command . name ) ) {
41- console . log ( "Command " + runCommand . command . name + " will be skipped." ) ;
42- continue ;
43- }
44- try {
45- result = runner . run ( runCommand ) ;
31+ if ( ! this . syntaxErrorLogger . activated ) {
32+ mainloop: for ( let stepIndex = 0 ; stepIndex < this . playbook . steps . length ; stepIndex ++ ) {
33+ for ( let lineIndex = 0 ; lineIndex < this . playbook . steps [ stepIndex ] . lines . length ; lineIndex ++ ) {
34+ let runCommand = this . initRunCommand ( stepIndex , lineIndex ) ;
35+ let foundRunnerToExecuteCommand = false ;
36+ for ( let runnerIndex in this . environment . runners ) {
37+ let runner = await this . getRunner ( this . environment . runners [ runnerIndex ] ) ;
38+ if ( runner . supports ( this . playbook . steps [ stepIndex ] . lines [ lineIndex ] . name , this . playbook . steps [ stepIndex ] . lines [ lineIndex ] . parameters ) ) {
39+ var result = new RunResult ( ) ;
40+ if ( runner . commandIsSkippable ( runCommand . command . name ) ) {
41+ console . log ( "Command " + runCommand . command . name + " will be skipped." ) ;
42+ continue ;
43+ }
44+ try {
45+ result = runner . run ( runCommand ) ;
46+ }
47+ catch ( e ) {
48+ result . exceptions . push ( e ) ;
49+ }
50+
51+ await runner . assert ( runCommand , result ) ;
52+
53+ foundRunnerToExecuteCommand = true ;
54+ break ;
4655 }
47- catch ( e ) {
48- result . exceptions . push ( e ) ;
49- }
50-
51- await runner . assert ( runCommand , result ) ;
52-
53- foundRunnerToExecuteCommand = true ;
54- break ;
5556 }
57+ if ( ! foundRunnerToExecuteCommand && ! this . environment . skipMissingFunctions ) {
58+ break mainloop;
59+ }
5660 }
57- if ( ! foundRunnerToExecuteCommand && ! this . environment . skipMissingFunctions ) {
58- break mainloop;
59- }
6061 }
6162 }
6263
@@ -86,7 +87,8 @@ export class Engine {
8687 }
8788 }
8889 if ( missingFunctions . length > 0 ) {
89- this . syntaxErrorLogger . handle ( "Environment incomplete: " + this . environmentName + " | Missing functions: \n - " + missingFunctions . join ( "\n - " ) ) ;
90+ console . log ( missingFunctions ) ;
91+ this . syntaxErrorLogger . handleMissingFunction ( missingFunctions ) ;
9092 return false ;
9193 } else {
9294 return true ;
0 commit comments