@@ -364,10 +364,10 @@ async function checkForUpdates(context: vscode.ExtensionContext): Promise<void>
364
364
365
365
if ( daysSince >= 7 ) { // Show update notification once per week
366
366
// Check if the current version supports self-update (>=0.2.1)
367
- const supportseSelfUpdate = isVersionAtLeast ( currentVersion , '0.2.1' ) ;
367
+ const supportsSelfUpdate = isVersionAtLeast ( currentVersion , '0.2.1' ) ;
368
368
369
369
let choice ;
370
- if ( supportseSelfUpdate ) {
370
+ if ( supportsSelfUpdate ) {
371
371
choice = await vscode . window . showInformationMessage (
372
372
`RAZ update available: v${ currentVersion } → ${ latestVersion } ` ,
373
373
"Update with CLI" ,
@@ -579,10 +579,10 @@ export async function activate(
579
579
}
580
580
581
581
const currentVersion = razVersion . replace ( 'v' , '' ) ;
582
- const supportseSelfUpdate = isVersionAtLeast ( currentVersion , '0.2.1' ) ;
582
+ const supportsSelfUpdate = isVersionAtLeast ( currentVersion , '0.2.1' ) ;
583
583
584
584
let choice ;
585
- if ( supportseSelfUpdate ) {
585
+ if ( supportsSelfUpdate ) {
586
586
choice = await vscode . window . showQuickPick ( [
587
587
{ label : "Update with CLI" , description : "Use 'raz self-update' command" } ,
588
588
{ label : "Manual Update" , description : "Show manual update instructions" }
@@ -648,9 +648,16 @@ export async function activate(
648
648
const config = vscode . workspace . getConfiguration ( "raz" ) ;
649
649
await config . update ( "path" , "" , vscode . ConfigurationTarget . Global ) ;
650
650
651
- // Clear old binary manager storage
652
- const binaryManager = new RazBinaryManager ( context , outputChannel ) ;
653
- await binaryManager . cleanupOldBinaries ( ) ;
651
+ // Clear old binary manager storage if it exists
652
+ // Note: cleanupOldBinaries method may not exist in newer versions
653
+ try {
654
+ const binaryManager = new RazBinaryManager ( context , outputChannel ) ;
655
+ if ( typeof ( binaryManager as any ) . cleanupOldBinaries === 'function' ) {
656
+ await ( binaryManager as any ) . cleanupOldBinaries ( ) ;
657
+ }
658
+ } catch ( e ) {
659
+ // Ignore if method doesn't exist
660
+ }
654
661
655
662
// Clear migration flags to force re-check
656
663
await context . globalState . update ( 'raz.migrated.v0.2.1' , undefined ) ;
0 commit comments