File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ export class Engine {
1313 constructor ( private environmentName : string , private environment : Environment , private playbook : Playbook ) { }
1414
1515 async run ( ) {
16+ for ( let runnerIndex in this . environment . runners ) {
17+ ( await this . getRunner ( this . environment . runners [ runnerIndex ] ) ) . init ( this . playbook ) ;
18+ }
19+
1620 console . log ( "Environment: " + this . environmentName ) ;
1721 if ( ! await this . isEnvironmentComplete ( ) ) {
1822 if ( this . environment . failOnIncomplete ) {
@@ -21,9 +25,6 @@ export class Engine {
2125 console . log ( "Environment incomplete: " + this . environmentName ) ;
2226 return ;
2327 }
24- for ( let runnerIndex in this . environment . runners ) {
25- ( await this . getRunner ( this . environment . runners [ runnerIndex ] ) ) . init ( this . playbook ) ;
26- }
2728
2829 mainloop: for ( let stepIndex = 0 ; stepIndex < this . playbook . steps . length ; stepIndex ++ ) {
2930 for ( let lineIndex = 0 ; lineIndex < this . playbook . steps [ stepIndex ] . lines . length ; lineIndex ++ ) {
Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ export class VsCode extends Runner {
2323 this . createFolder ( path . join ( __dirname , "resources" ) , false ) ;
2424 this . createFolder ( path . normalize ( this . getWorkingDirectory ( ) ) , true ) ;
2525 this . env = process . env ;
26+
27+ playbook . steps . forEach ( step => {
28+ step . lines . forEach ( stepLine => {
29+ if ( ( stepLine . name == "installDevonfwIde" || stepLine . name == "restoreDevonfwIde" ) && stepLine . parameters [ 0 ] . indexOf ( "vscode" ) > - 1 ) {
30+ this . installVsCodeFlag = true ;
31+ }
32+ } ) ;
33+ } ) ;
2634 }
2735
2836 destroy ( playbook : Playbook ) : void {
@@ -169,9 +177,6 @@ export class VsCode extends Runner {
169177 }
170178
171179 supports ( name : string , parameters : any [ ] ) : boolean {
172- if ( ( name == "installDevonfwIde" || name == "restoreDevonfwIde" ) && parameters [ 0 ] . indexOf ( "vscode" ) > - 1 ) {
173- this . installVsCodeFlag = true ;
174- }
175180 return super . supports ( name , parameters ) && this . installVsCodeFlag ;
176181 }
177182}
You can’t perform that action at this time.
0 commit comments