File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ var WebpackShellPlugin = function () {
89
89
90
90
createClass ( WebpackShellPlugin , [ {
91
91
key : 'puts' ,
92
- value : function puts ( error , stdout , stderr ) {
92
+ value : function puts ( error ) {
93
93
if ( error && ! this . options . swallowError ) {
94
94
throw error ;
95
95
}
@@ -120,14 +120,14 @@ var WebpackShellPlugin = function () {
120
120
key : 'handleScript' ,
121
121
value : function handleScript ( script ) {
122
122
if ( os . platform ( ) === 'win32' || this . options . safe ) {
123
- this . spreadStdoutAndStdErr ( exec ( script , this . puts ) ) ;
123
+ this . spreadStdoutAndStdErr ( exec ( script , this . puts . bind ( this ) ) ) ;
124
124
} else {
125
125
var _serializeScript = this . serializeScript ( script ) ,
126
126
command = _serializeScript . command ,
127
127
args = _serializeScript . args ;
128
128
129
129
var proc = spawn ( command , args , { stdio : 'inherit' } ) ;
130
- proc . on ( 'close' , this . puts ) ;
130
+ proc . on ( 'close' , this . puts . bind ( this ) ) ;
131
131
}
132
132
}
133
133
} , {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export default class WebpackShellPlugin {
17
17
this . options = this . validateInput ( this . mergeOptions ( options , defaultOptions ) ) ;
18
18
}
19
19
20
- puts ( error , stdout , stderr ) {
20
+ puts ( error ) {
21
21
if ( error && ! this . options . swallowError ) {
22
22
throw error ;
23
23
}
@@ -39,11 +39,11 @@ export default class WebpackShellPlugin {
39
39
40
40
handleScript ( script ) {
41
41
if ( os . platform ( ) === 'win32' || this . options . safe ) {
42
- this . spreadStdoutAndStdErr ( exec ( script , this . puts ) ) ;
42
+ this . spreadStdoutAndStdErr ( exec ( script , this . puts . bind ( this ) ) ) ;
43
43
} else {
44
44
const { command, args} = this . serializeScript ( script ) ;
45
45
const proc = spawn ( command , args , { stdio : 'inherit' } ) ;
46
- proc . on ( 'close' , this . puts ) ;
46
+ proc . on ( 'close' , this . puts . bind ( this ) ) ;
47
47
}
48
48
}
49
49
You can’t perform that action at this time.
0 commit comments