@@ -235,14 +235,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
235
235
cmd = cmd + sources . join ( " " ) ;
236
236
console . log ( cmd + "\n" ) ;
237
237
238
- var ex = jake . createExec ( [ cmd ] ) ;
239
- // Add listeners for output and error
240
- ex . addListener ( "stdout" , function ( output ) {
241
- process . stdout . write ( output ) ;
242
- } ) ;
243
- ex . addListener ( "stderr" , function ( error ) {
244
- process . stderr . write ( error ) ;
245
- } ) ;
238
+ var ex = jake . createExec ( [ cmd ] , { interactive : true } ) ;
246
239
ex . addListener ( "cmdEnd" , function ( ) {
247
240
if ( ! useDebugMode && prefixes && fs . existsSync ( outFile ) ) {
248
241
for ( var i in prefixes ) {
@@ -304,18 +297,9 @@ compileFile(processDiagnosticMessagesJs,
304
297
file ( diagnosticInfoMapTs , [ processDiagnosticMessagesJs , diagnosticMessagesJson ] , function ( ) {
305
298
var cmd = "node " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson ;
306
299
console . log ( cmd ) ;
307
- var ex = jake . createExec ( [ cmd ] ) ;
308
- // Add listeners for output and error
309
- ex . addListener ( "stdout" , function ( output ) {
310
- process . stdout . write ( output ) ;
311
- } ) ;
312
- ex . addListener ( "stderr" , function ( error ) {
313
- process . stderr . write ( error ) ;
314
- } ) ;
315
- ex . addListener ( "cmdEnd" , function ( ) {
300
+ exec ( cmd , function ( ) {
316
301
complete ( ) ;
317
302
} ) ;
318
- ex . run ( ) ;
319
303
} , { async : true } )
320
304
321
305
desc ( "Generates a diagnostic file in TypeScript based on an input JSON file" ) ;
@@ -476,14 +460,7 @@ desc("Builds the test infrastructure using the built compiler");
476
460
task ( "tests" , [ "local" , run ] . concat ( libraryTargets ) ) ;
477
461
478
462
function exec ( cmd , completeHandler ) {
479
- var ex = jake . createExec ( [ cmd ] , { windowsVerbatimArguments : true } ) ;
480
- // Add listeners for output and error
481
- ex . addListener ( "stdout" , function ( output ) {
482
- process . stdout . write ( output ) ;
483
- } ) ;
484
- ex . addListener ( "stderr" , function ( error ) {
485
- process . stderr . write ( error ) ;
486
- } ) ;
463
+ var ex = jake . createExec ( [ cmd ] , { windowsVerbatimArguments : true , interactive : true } ) ;
487
464
ex . addListener ( "cmdEnd" , function ( ) {
488
465
if ( completeHandler ) {
489
466
completeHandler ( ) ;
@@ -677,13 +654,12 @@ file(loggedIOJsPath, [builtLocalDirectory, loggedIOpath], function() {
677
654
var options = "--outdir " + temp + ' ' + loggedIOpath ;
678
655
var cmd = host + " " + LKGDirectory + compilerFilename + " " + options + " " ;
679
656
console . log ( cmd + "\n" ) ;
680
- var ex = jake . createExec ( [ cmd ] ) ;
681
- ex . addListener ( "cmdEnd" , function ( ) {
657
+
658
+ exec ( cmd , function ( ) {
682
659
fs . renameSync ( temp + '/harness/loggedIO.js' , loggedIOJsPath ) ;
683
660
jake . rmRf ( temp ) ;
684
661
complete ( ) ;
685
662
} ) ;
686
- ex . run ( ) ;
687
663
} , { async : true } ) ;
688
664
689
665
var instrumenterPath = harnessDirectory + 'instrumenter.ts' ;
@@ -694,9 +670,7 @@ desc("Builds an instrumented tsc.js");
694
670
task ( 'tsc-instrumented' , [ loggedIOJsPath , instrumenterJsPath , tscFile ] , function ( ) {
695
671
var cmd = host + ' ' + instrumenterJsPath + ' record iocapture ' + builtLocalDirectory + compilerFilename ;
696
672
console . log ( cmd ) ;
697
- var ex = jake . createExec ( [ cmd ] ) ;
698
- ex . addListener ( "cmdEnd" , function ( ) {
673
+ exec ( cmd , function ( ) {
699
674
complete ( ) ;
700
675
} ) ;
701
- ex . run ( ) ;
702
676
} , { async : true } ) ;
0 commit comments