From 621a5d12db0fef1f5b11bfe514599352c7bf026f Mon Sep 17 00:00:00 2001 From: Phil Mahncke Date: Wed, 12 Nov 2025 11:50:28 -0500 Subject: [PATCH] fix(installer): improve dynamic bmad folder name extraction from config - Updated the installer to load existing configuration for bmad folder name, ensuring consistency across installation flows. - Implemented fallback logic to derive the folder name from the path or default to 'bmad' if no config is available. - Enhanced integration with module and IDE managers to utilize the dynamically determined folder name. --- tools/cli/installers/lib/core/installer.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/cli/installers/lib/core/installer.js b/tools/cli/installers/lib/core/installer.js index d2e949cc..5b9f1d9d 100644 --- a/tools/cli/installers/lib/core/installer.js +++ b/tools/cli/installers/lib/core/installer.js @@ -1560,10 +1560,13 @@ class Installer { throw new Error(`BMAD not installed at ${bmadDir}`); } - // Extract bmad folder name from the directory path and set it on managers - // This ensures generated IDE commands use the correct folder name (e.g., .bmad vs bmad) - const bmadFolderName = path.basename(bmadDir); - this.bmadFolderName = bmadFolderName; // Store for use in other methods + // Load existing config to get bmad_folder (consistent with install() and quickUpdate() flows) + await this.configCollector.loadExistingConfig(projectDir); + + // Extract bmad folder name from config (consistent with other installer flows) + // Fallback to path basename if config not available, then to 'bmad' as last resort + this.bmadFolderName = + this.configCollector.existingConfig?.core?.bmad_folder || this.configCollector.collectedConfig?.core?.bmad_folder || 'bmad'; this.moduleManager.setBmadFolderName(bmadFolderName); this.ideManager.setBmadFolderName(bmadFolderName);