File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -22,22 +22,28 @@ import { showSplash } from './utils/splash';
2222// Read package.json for version
2323const packageJson = require ( '../package.json' ) ;
2424
25- // Check for updates
26- updateNotifier ( {
27- pkg : packageJson ,
28- updateCheckInterval : 1000 * 60 * 60 * 24 , // Check once per day
29- } ) . notify ( {
30- isGlobal : true ,
31- defer : false ,
32- } ) ;
33-
3425/**
3526 * Main CLI function
3627 */
3728async function main ( ) : Promise < void > {
3829 // Show splash screen animation
3930 await showSplash ( packageJson . version ) ;
4031
32+ // Check for updates (after splash to avoid being cleared)
33+ const notifier = updateNotifier ( {
34+ pkg : packageJson ,
35+ updateCheckInterval : 1000 * 60 * 60 * 24 , // Check once per day
36+ } ) ;
37+
38+ if ( notifier . update ) {
39+ logger . newline ( ) ;
40+ notifier . notify ( {
41+ isGlobal : true ,
42+ defer : false ,
43+ } ) ;
44+ logger . newline ( ) ;
45+ }
46+
4147 // Create Commander program
4248 const program = new Command ( ) ;
4349
You can’t perform that action at this time.
0 commit comments