installer for delete and replace fixed
This commit is contained in:
parent
1c5b30f361
commit
1cfd58ebb1
|
|
@ -27,9 +27,12 @@ class UI {
|
||||||
const bmadDir = path.join(confirmedDirectory, 'bmad');
|
const bmadDir = path.join(confirmedDirectory, 'bmad');
|
||||||
const hasExistingInstall = await fs.pathExists(bmadDir);
|
const hasExistingInstall = await fs.pathExists(bmadDir);
|
||||||
|
|
||||||
|
// Track action type (only set if there's an existing installation)
|
||||||
|
let actionType;
|
||||||
|
|
||||||
// Only show action menu if there's an existing installation
|
// Only show action menu if there's an existing installation
|
||||||
if (hasExistingInstall) {
|
if (hasExistingInstall) {
|
||||||
const { actionType } = await inquirer.prompt([
|
const promptResult = await inquirer.prompt([
|
||||||
{
|
{
|
||||||
type: 'list',
|
type: 'list',
|
||||||
name: 'actionType',
|
name: 'actionType',
|
||||||
|
|
@ -45,6 +48,9 @@ class UI {
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// Extract actionType from prompt result
|
||||||
|
actionType = promptResult.actionType;
|
||||||
|
|
||||||
// Handle quick update separately
|
// Handle quick update separately
|
||||||
if (actionType === 'quick-update') {
|
if (actionType === 'quick-update') {
|
||||||
return {
|
return {
|
||||||
|
|
@ -69,15 +75,11 @@ class UI {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle reinstall
|
// Handle reinstall - DON'T return early, let it flow through configuration collection
|
||||||
if (actionType === 'reinstall') {
|
// The installer will handle deletion when it sees actionType === 'reinstall'
|
||||||
return {
|
// For now, just note that we're in reinstall mode and continue below
|
||||||
actionType: 'reinstall',
|
|
||||||
directory: confirmedDirectory,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// If actionType === 'update', continue with normal flow below
|
// If actionType === 'update' or 'reinstall', continue with normal flow below
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collect IDE tool selection EARLY (before module configuration)
|
// Collect IDE tool selection EARLY (before module configuration)
|
||||||
|
|
@ -94,7 +96,7 @@ class UI {
|
||||||
CLIUtils.displayModuleComplete('core', false); // false = don't clear the screen again
|
CLIUtils.displayModuleComplete('core', false); // false = don't clear the screen again
|
||||||
|
|
||||||
return {
|
return {
|
||||||
actionType: 'update', // User chose to update/modify existing installation
|
actionType: actionType || 'update', // Preserve reinstall or update action
|
||||||
directory: confirmedDirectory,
|
directory: confirmedDirectory,
|
||||||
installCore: true, // Always install core
|
installCore: true, // Always install core
|
||||||
modules: selectedModules,
|
modules: selectedModules,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue