@@ -297,18 +297,9 @@ compileFile(processDiagnosticMessagesJs,
297297file ( diagnosticInfoMapTs , [ processDiagnosticMessagesJs , diagnosticMessagesJson ] , function ( ) {
298298 var cmd = "node " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson ;
299299 console . log ( cmd ) ;
300- var ex = jake . createExec ( [ cmd ] ) ;
301- // Add listeners for output and error
302- ex . addListener ( "stdout" , function ( output ) {
303- process . stdout . write ( output ) ;
304- } ) ;
305- ex . addListener ( "stderr" , function ( error ) {
306- process . stderr . write ( error ) ;
307- } ) ;
308- ex . addListener ( "cmdEnd" , function ( ) {
300+ exec ( cmd , function ( ) {
309301 complete ( ) ;
310302 } ) ;
311- ex . run ( ) ;
312303} , { async : true } )
313304
314305desc ( "Generates a diagnostic file in TypeScript based on an input JSON file" ) ;
@@ -469,14 +460,7 @@ desc("Builds the test infrastructure using the built compiler");
469460task ( "tests" , [ "local" , run ] . concat ( libraryTargets ) ) ;
470461
471462function exec ( cmd , completeHandler ) {
472- var ex = jake . createExec ( [ cmd ] , { windowsVerbatimArguments : true } ) ;
473- // Add listeners for output and error
474- ex . addListener ( "stdout" , function ( output ) {
475- process . stdout . write ( output ) ;
476- } ) ;
477- ex . addListener ( "stderr" , function ( error ) {
478- process . stderr . write ( error ) ;
479- } ) ;
463+ var ex = jake . createExec ( [ cmd ] , { windowsVerbatimArguments : true , interactive : true } ) ;
480464 ex . addListener ( "cmdEnd" , function ( ) {
481465 if ( completeHandler ) {
482466 completeHandler ( ) ;
@@ -670,13 +654,12 @@ file(loggedIOJsPath, [builtLocalDirectory, loggedIOpath], function() {
670654 var options = "--outdir " + temp + ' ' + loggedIOpath ;
671655 var cmd = host + " " + LKGDirectory + compilerFilename + " " + options + " " ;
672656 console . log ( cmd + "\n" ) ;
673- var ex = jake . createExec ( [ cmd ] ) ;
674- ex . addListener ( "cmdEnd" , function ( ) {
657+
658+ exec ( cmd , function ( ) {
675659 fs . renameSync ( temp + '/harness/loggedIO.js' , loggedIOJsPath ) ;
676660 jake . rmRf ( temp ) ;
677661 complete ( ) ;
678662 } ) ;
679- ex . run ( ) ;
680663} , { async : true } ) ;
681664
682665var instrumenterPath = harnessDirectory + 'instrumenter.ts' ;
@@ -687,9 +670,7 @@ desc("Builds an instrumented tsc.js");
687670task ( 'tsc-instrumented' , [ loggedIOJsPath , instrumenterJsPath , tscFile ] , function ( ) {
688671 var cmd = host + ' ' + instrumenterJsPath + ' record iocapture ' + builtLocalDirectory + compilerFilename ;
689672 console . log ( cmd ) ;
690- var ex = jake . createExec ( [ cmd ] ) ;
691- ex . addListener ( "cmdEnd" , function ( ) {
673+ exec ( cmd , function ( ) {
692674 complete ( ) ;
693675 } ) ;
694- ex . run ( ) ;
695676} , { async : true } ) ;
0 commit comments