feat: add early v4 detection for improved update flow
- Now detects existing v4 installations immediately after directory prompt - Offers update option upfront for existing v4 installations - If user declines update, continues with normal installation flow - Added 'update' install type handling in installer - Improves user experience by streamlining the update process 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -102,6 +102,17 @@ class Installer {
|
||||
spinner.start("Analyzing installation directory...");
|
||||
}
|
||||
|
||||
// If this is an update request from early detection, handle it directly
|
||||
if (config.installType === 'update') {
|
||||
const state = await this.detectInstallationState(installDir);
|
||||
if (state.type === 'v4_existing') {
|
||||
return await this.performUpdate(config, installDir, state.manifest, spinner);
|
||||
} else {
|
||||
spinner.fail('No existing v4 installation found to update');
|
||||
throw new Error('No existing v4 installation found');
|
||||
}
|
||||
}
|
||||
|
||||
// Detect current state
|
||||
const state = await this.detectInstallationState(installDir);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user