File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,19 +77,23 @@ export class AutoUpdater {
7777 return ;
7878 }
7979
80+ const notifier = this . output . notify ( 'Updating the CLI' ) ;
81+
8082 try {
8183 await this . packageManager . updatePackage ( 'croct' , isInstalledGlobally ) ;
8284 } catch ( error ) {
8385 const updateCommand = await this . packageManager . getPackageUpdateCommand ( 'croct' , isInstalledGlobally ) ;
8486 const fullCommand = `${ updateCommand . name } ${ updateCommand . arguments ?. join ( ' ' ) } ` ;
8587
86- this . output . alert ( 'Failed to update the Croct CLI automatically' ) ;
88+ notifier . alert ( 'Failed to update the CLI automatically' ) ;
89+
8790 this . output . log ( `Please run the command:\n\`${ fullCommand } \`` ) ;
8891
8992 return ;
9093 }
9194
92- this . output . confirm ( 'CLI updated successfully!' ) ;
95+ notifier . confirm ( 'CLI updated successfully!' ) ;
96+
9397 this . output . inform ( 'The new version will take effect the next time you run a command' ) ;
9498 }
9599
You can’t perform that action at this time.
0 commit comments