|
@@ -60,10 +60,14 @@ function updateYear( err, fileNames ) {
|
|
|
// License headers are only required in JS files.
|
|
// License headers are only required in JS files.
|
|
|
// Also, the file might have already been updated.
|
|
// Also, the file might have already been updated.
|
|
|
if ( fileName.endsWith( '.js' ) && !data.match( regexp ) ) {
|
|
if ( fileName.endsWith( '.js' ) && !data.match( regexp ) ) {
|
|
|
- console.warn( `The file "${ fileName }" misses a license header.` );
|
|
|
|
|
|
|
+ console.warn( `The file "${ process.cwd() }/${ fileName }" misses a license header.` );
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- fs.writeFile( fileName, updatedData );
|
|
|
|
|
|
|
+ fs.writeFile( fileName, updatedData, err => {
|
|
|
|
|
+ if ( err ) {
|
|
|
|
|
+ throw err;
|
|
|
|
|
+ }
|
|
|
|
|
+ } );
|
|
|
}
|
|
}
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|