File tree 2 files changed +3
-9
lines changed
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -1199,7 +1199,7 @@ export function rmRF(path: string): void {
1199
1199
*/
1200
1200
export function exec ( tool : string , args : any , options ?: trm . IExecOptions ) : Q . Promise < number > {
1201
1201
let tr : trm . ToolRunner = this . tool ( tool ) ;
1202
- tr . on ( 'debug' , ( data ) => {
1202
+ tr . on ( 'debug' , ( data : string ) => {
1203
1203
debug ( data ) ;
1204
1204
} ) ;
1205
1205
Original file line number Diff line number Diff line change @@ -496,7 +496,7 @@ export class ToolRunner extends events.EventEmitter {
496
496
return result ;
497
497
}
498
498
499
- private execWithPiping ( options ?: IExecOptions ) : Q . Promise < number > {
499
+ private execWithPiping ( pipeOutputToTool : ToolRunner , options ?: IExecOptions ) : Q . Promise < number > {
500
500
var defer = Q . defer < number > ( ) ;
501
501
502
502
this . _debug ( 'exec tool: ' + this . toolPath ) ;
@@ -505,12 +505,6 @@ export class ToolRunner extends events.EventEmitter {
505
505
this . _debug ( ' ' + arg ) ;
506
506
} ) ;
507
507
508
- // This is a private method, and must be called only when `this.pipeOutputToTool` is set
509
- if ( ! this . pipeOutputToTool ) {
510
- throw new Error ( 'You must call pipeExecOutputToTool before calling execWithPiping' ) ;
511
- }
512
- const pipeOutputToTool = this . pipeOutputToTool ;
513
-
514
508
let success = true ;
515
509
const optionsNonNull = this . _cloneExecOptions ( options ) ;
516
510
@@ -783,7 +777,7 @@ export class ToolRunner extends events.EventEmitter {
783
777
*/
784
778
public exec ( options ?: IExecOptions ) : Q . Promise < number > {
785
779
if ( this . pipeOutputToTool ) {
786
- return this . execWithPiping ( options ) ;
780
+ return this . execWithPiping ( this . pipeOutputToTool , options ) ;
787
781
}
788
782
789
783
var defer = Q . defer < number > ( ) ;
You can’t perform that action at this time.
0 commit comments