@@ -297,18 +297,9 @@ compileFile(processDiagnosticMessagesJs,
297
297
file ( diagnosticInfoMapTs , [ processDiagnosticMessagesJs , diagnosticMessagesJson ] , function ( ) {
298
298
var cmd = "node " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson ;
299
299
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 ( ) {
309
301
complete ( ) ;
310
302
} ) ;
311
- ex . run ( ) ;
312
303
} , { async : true } )
313
304
314
305
desc ( "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");
469
460
task ( "tests" , [ "local" , run ] . concat ( libraryTargets ) ) ;
470
461
471
462
function 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 } ) ;
480
464
ex . addListener ( "cmdEnd" , function ( ) {
481
465
if ( completeHandler ) {
482
466
completeHandler ( ) ;
@@ -670,13 +654,12 @@ file(loggedIOJsPath, [builtLocalDirectory, loggedIOpath], function() {
670
654
var options = "--outdir " + temp + ' ' + loggedIOpath ;
671
655
var cmd = host + " " + LKGDirectory + compilerFilename + " " + options + " " ;
672
656
console . log ( cmd + "\n" ) ;
673
- var ex = jake . createExec ( [ cmd ] ) ;
674
- ex . addListener ( "cmdEnd" , function ( ) {
657
+
658
+ exec ( cmd , function ( ) {
675
659
fs . renameSync ( temp + '/harness/loggedIO.js' , loggedIOJsPath ) ;
676
660
jake . rmRf ( temp ) ;
677
661
complete ( ) ;
678
662
} ) ;
679
- ex . run ( ) ;
680
663
} , { async : true } ) ;
681
664
682
665
var instrumenterPath = harnessDirectory + 'instrumenter.ts' ;
@@ -687,9 +670,7 @@ desc("Builds an instrumented tsc.js");
687
670
task ( 'tsc-instrumented' , [ loggedIOJsPath , instrumenterJsPath , tscFile ] , function ( ) {
688
671
var cmd = host + ' ' + instrumenterJsPath + ' record iocapture ' + builtLocalDirectory + compilerFilename ;
689
672
console . log ( cmd ) ;
690
- var ex = jake . createExec ( [ cmd ] ) ;
691
- ex . addListener ( "cmdEnd" , function ( ) {
673
+ exec ( cmd , function ( ) {
692
674
complete ( ) ;
693
675
} ) ;
694
- ex . run ( ) ;
695
676
} , { async : true } ) ;
0 commit comments