@@ -75,11 +75,9 @@ For more information, see https://webpack.js.org/api/cli/.`);
7575 let errorMessage =
7676 "\n\u001b[31mwebpack not found, please install webpack using\n\t\u001b[33mnpm install --save-dev webpack\n" ;
7777
78- if ( process . env . npm_execpath !== undefined ) {
79- if ( process . env . npm_execpath . indexOf ( "yarn" ) !== - 1 ) {
80- errorMessage =
81- "\n\u001b[31mwebpack not found, please install webpack using\n\t\u001b[33myarn add webpack --dev\n" ;
82- }
78+ if ( process . env . npm_execpath !== undefined && process . env . npm_execpath . includes ( "yarn" ) ) {
79+ errorMessage =
80+ "\n\u001b[31mwebpack not found, please install webpack using\n\t\u001b[33myarn add webpack --dev\n" ;
8381 }
8482
8583 console . error ( errorMessage ) ;
@@ -109,7 +107,7 @@ For more information, see https://webpack.js.org/api/cli/.`);
109107 */
110108 const stdout = argv . silent
111109 ? {
112- write : ( ) => { }
110+ write : ( ) => { }
113111 } // eslint-disable-line
114112 : process . stdout ;
115113
@@ -342,19 +340,14 @@ For more information, see https://webpack.js.org/api/cli/.`);
342340 const SIX_DAYS = 518400000 ;
343341 const now = new Date ( ) ;
344342 if ( now . getDay ( ) === MONDAY ) {
345- const {
346- access,
347- constants,
348- statSync,
349- utimesSync,
350- } = require ( "fs" ) ;
343+ const { access, constants, statSync, utimesSync } = require ( "fs" ) ;
351344 const lastPrint = statSync ( openCollectivePath ) . atime ;
352345 const lastPrintTS = new Date ( lastPrint ) . getTime ( ) ;
353346 const timeSinceLastPrint = now . getTime ( ) - lastPrintTS ;
354347 if ( timeSinceLastPrint > SIX_DAYS ) {
355348 require ( openCollectivePath ) ;
356349 // On windows we need to manually update the atime
357- access ( openCollectivePath , constants . W_OK , ( e ) => {
350+ access ( openCollectivePath , constants . W_OK , e => {
358351 if ( ! e ) utimesSync ( openCollectivePath , now , now ) ;
359352 } ) ;
360353 }
0 commit comments