Skip to content

Commit ba48846

Browse files
Now just checks if all functions are supported
1 parent 4cc9224 commit ba48846

1 file changed

Lines changed: 27 additions & 26 deletions

File tree

engine/engine.ts

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)