bmad_folder replacement working properly with custom and defauly modules
This commit is contained in:
parent
86f2786dde
commit
9d7b09d065
|
|
@ -853,8 +853,13 @@ class ModuleManager {
|
||||||
// Compile with customizations if any
|
// Compile with customizations if any
|
||||||
const { xml } = compileAgent(yamlContent, {}, agentName, relativePath, { config: this.coreConfig });
|
const { xml } = compileAgent(yamlContent, {}, agentName, relativePath, { config: this.coreConfig });
|
||||||
|
|
||||||
// Write the compiled MD file
|
// Replace {bmad_folder} placeholder if needed
|
||||||
await fs.writeFile(targetMdPath, xml, 'utf8');
|
if (xml.includes('{bmad_folder}') && this.bmadFolderName) {
|
||||||
|
const processedXml = xml.replaceAll('{bmad_folder}', this.bmadFolderName);
|
||||||
|
await fs.writeFile(targetMdPath, processedXml, 'utf8');
|
||||||
|
} else {
|
||||||
|
await fs.writeFile(targetMdPath, xml, 'utf8');
|
||||||
|
}
|
||||||
|
|
||||||
// Copy sidecar files if agent has hasSidecar flag
|
// Copy sidecar files if agent has hasSidecar flag
|
||||||
if (hasSidecar) {
|
if (hasSidecar) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue