fix: BMAD install creates .bmad-core/.bmad-core/ directory structure + updates (#223)
* chore: fix installation directory handling to use .bmad-core as default path - Remove redundant ./ prefix from default directory - Update all default paths from ./.bmad-core to .bmad-core - Add logic to handle direct .bmad-core path selection - Treat parent as project root when .bmad-core specified - Simplify directory state detection for existing files - Remove unknown_existing state type from installer logic * chore: refactor installer to use modern JS patterns and improve code clarity ## CHANGES - Replace require with node:path import - Add block scoping to switch cases - Remove unused options parameter from update - Use optional chaining for ideConfig check - Replace forEach with for...of loops - Use template literals for string concatenation - Add early return to avoid else block - Update spell check dictionary entries * chore: update dependencies to latest major versions ## CHANGES - Update @kayvan/markdown-tree-parser to v1.5.0 - Update chalk to v5.4.1 for ESM support - Update commander to v14.0.0 with Node 20 requirement - Update fs-extra to v11.3.0 - Update glob to v11.0.3 with new API - Update inquirer to v12.6.3 with modular design - Update ora to v8.2.0 with improved features
This commit is contained in:
@@ -37,7 +37,7 @@ program
|
||||
.description('Install BMAD Method agents and tools')
|
||||
.option('-f, --full', 'Install complete .bmad-core folder')
|
||||
.option('-a, --agent <agent>', 'Install specific agent with dependencies')
|
||||
.option('-d, --directory <path>', 'Installation directory (default: ./bmad-core)')
|
||||
.option('-d, --directory <path>', 'Installation directory (default: .bmad-core)')
|
||||
.option('-i, --ide <ide>', 'Configure for specific IDE (cursor, claude-code, windsurf, roo)')
|
||||
.action(async (options) => {
|
||||
try {
|
||||
@@ -50,7 +50,7 @@ program
|
||||
const config = {
|
||||
installType: options.full ? 'full' : 'single-agent',
|
||||
agent: options.agent,
|
||||
directory: options.directory || './.bmad-core',
|
||||
directory: options.directory || '.bmad-core',
|
||||
ide: options.ide
|
||||
};
|
||||
await installer.install(config);
|
||||
@@ -66,9 +66,9 @@ program
|
||||
.description('Update existing BMAD installation')
|
||||
.option('--force', 'Force update, overwriting modified files')
|
||||
.option('--dry-run', 'Show what would be updated without making changes')
|
||||
.action(async (options) => {
|
||||
.action(async () => {
|
||||
try {
|
||||
await installer.update(options);
|
||||
await installer.update();
|
||||
} catch (error) {
|
||||
console.error(chalk.red('Update failed:'), error.message);
|
||||
process.exit(1);
|
||||
@@ -110,7 +110,7 @@ async function promptInstallation() {
|
||||
type: 'input',
|
||||
name: 'directory',
|
||||
message: 'Where would you like to install BMAD?',
|
||||
default: './.bmad-core'
|
||||
default: '.bmad-core'
|
||||
}
|
||||
]);
|
||||
answers.directory = directory;
|
||||
|
||||
Reference in New Issue
Block a user