diff --git a/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js b/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js index 7edb130b..18f37770 100644 --- a/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +++ b/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js @@ -38,6 +38,10 @@ class TaskToolCommandGenerator { // Collect task artifacts for (const task of standaloneTasks) { let taskPath = (task.path || '').replaceAll('\\', '/'); + // Convert absolute paths to relative paths + if (path.isAbsolute(taskPath)) { + taskPath = path.relative(bmadDir, taskPath).replaceAll('\\', '/'); + } // Remove _bmad/ prefix if present to get relative path within bmad folder if (taskPath.startsWith(bmadPrefix)) { taskPath = taskPath.slice(bmadPrefix.length); @@ -59,6 +63,10 @@ class TaskToolCommandGenerator { // Collect tool artifacts for (const tool of standaloneTools) { let toolPath = (tool.path || '').replaceAll('\\', '/'); + // Convert absolute paths to relative paths + if (path.isAbsolute(toolPath)) { + toolPath = path.relative(bmadDir, toolPath).replaceAll('\\', '/'); + } // Remove _bmad/ prefix if present to get relative path within bmad folder if (toolPath.startsWith(bmadPrefix)) { toolPath = toolPath.slice(bmadPrefix.length);