File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -126,19 +126,19 @@ module.exports = function (b, opts) {
126
126
return ;
127
127
}
128
128
if ( text . indexOf ( '[COVERAGE ' ) === 0 ) {
129
- if ( process . env . NYC_ROOT_ID ) {
130
- var nycConfig = JSON . parse ( process . env . NYC_CONFIG ) ;
131
- var json = text . substring ( 10 , text . length - 1 ) ;
132
- var file = path . join ( nycConfig . tempDir ,
133
- process . env . NYC_ROOT_ID + '.json' ) ;
134
- fs . writeFile ( file , json , 'utf8' , function ( err ) {
135
- if ( err ) {
136
- b . emit ( 'error' , err ) ;
137
- }
138
- } ) ;
139
- return ;
129
+ var nycRootID = process . env . NYC_ROOT_ID ;
130
+ if ( ! nycRootID ) {
131
+ // NYC >v15 does not export a NYC_ROOT_ID so use a "random" uuid instead
132
+ nycRootID = '4638ceac-c8d9-411d-9e1f-72755846a221' ;
140
133
}
141
- output . write ( 'Coverage information received, but no nyc\n' ) ;
134
+ var nycConfig = JSON . parse ( process . env . NYC_CONFIG ) ;
135
+ var json = text . substring ( 10 , text . length - 1 ) ;
136
+ var file = path . join ( nycConfig . tempDir , nycRootID + '.json' ) ;
137
+ fs . writeFile ( file , json , 'utf8' , function ( err ) {
138
+ if ( err ) {
139
+ b . emit ( 'error' , err ) ;
140
+ }
141
+ } ) ;
142
142
return ;
143
143
}
144
144
if ( text . indexOf ( '[EXIT ' ) === 0 ) {
You can’t perform that action at this time.
0 commit comments