This repository was archived by the owner on Sep 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -131,11 +131,28 @@ module.exports = function(initOptions) {
131
131
compilerProcess . stderr . on ( 'data' , function ( data ) {
132
132
stdErrData += data ;
133
133
} ) ;
134
- compilerProcess . on ( 'close' , ( function ( code ) {
134
+
135
+ Promise . all ( [
136
+ new Promise ( function ( resolve ) {
137
+ compilerProcess . on ( 'close' , function ( code ) {
138
+ resolve ( code ) ;
139
+ } ) ;
140
+ } ) ,
141
+ new Promise ( function ( resolve ) {
142
+ compilerProcess . stdout . on ( 'end' , function ( ) {
143
+ resolve ( ) ;
144
+ } ) ;
145
+ } ) ,
146
+ new Promise ( function ( resolve ) {
147
+ compilerProcess . stderr . on ( 'end' , function ( ) {
148
+ resolve ( ) ;
149
+ } ) ;
150
+ } )
151
+ ] ) . then ( ( function ( results ) {
152
+ var code = results [ 0 ] ;
135
153
// non-zero exit means a compilation error
136
154
if ( code !== 0 ) {
137
- this . emit ( 'error' , new PluginError ( this . PLUGIN_NAME_ ,
138
- 'Compilation error: \n\n' + compiler . prependFullCommand ( stdErrData ) ) ) ;
155
+ this . emit ( 'error' , new PluginError ( this . PLUGIN_NAME_ , 'Compilation error' ) ) ;
139
156
}
140
157
141
158
// standard error will contain compilation warnings, log those
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ describe('gulp-google-closure-compiler', function() {
53
53
} ) ;
54
54
55
55
stream . on ( 'error' , function ( err ) {
56
- err . message . should . startWith ( 'Compilation error: ' ) ;
56
+ err . message . should . startWith ( 'Compilation error' ) ;
57
57
done ( ) ;
58
58
} ) ;
59
59
stream . write ( fakeFile1 ) ;
You can’t perform that action at this time.
0 commit comments