@@ -25,7 +25,6 @@ export class Katacoda extends Runner {
2525 private terminalCounter : number = 1 ;
2626 private showVsCodeIde : boolean = false ;
2727 private terminals : KatacodaTerminals [ ] = [ { function : "default" , terminalId : 1 } ] ;
28- private runResult : RunResult = new RunResult ( ) ;
2928
3029 init ( playbook : Playbook ) : void {
3130 // create directory for katacoda tutorials if not exist
@@ -465,13 +464,9 @@ export class Katacoda extends Runner {
465464 }
466465
467466 private renderTemplate ( name : string , targetPath : string , variables ) {
468- try {
469- let template = fs . readFileSync ( path . join ( this . getRunnerDirectory ( ) , "templates" , name ) , 'utf8' ) ;
470- let result = ejs . render ( template , variables ) ;
471- fs . writeFileSync ( targetPath , result , { flag : "a" } ) ;
472- } catch ( e ) {
473- this . runResult . exceptions . push ( e ) ;
474- }
467+ let template = fs . readFileSync ( path . join ( this . getRunnerDirectory ( ) , "templates" , name ) , 'utf8' ) ;
468+ let result = ejs . render ( template , variables ) ;
469+ fs . writeFileSync ( targetPath , result , { flag : "a" } ) ;
475470 }
476471
477472 private writeSetupFile ( setupFile : string ) {
@@ -542,7 +537,9 @@ export class Katacoda extends Runner {
542537 }
543538
544539 async assert ( runCommand : RunCommand , runResult : RunResult ) : Promise < void > {
545- new Assertions ( ) . noException ( this . runResult ) ;
540+ if ( runResult != null ) {
541+ new Assertions ( ) . noException ( runResult ) ;
542+ }
546543 }
547544
548545}
0 commit comments