From a69810afe5e469ed647b6ed3d83e3cd3cf1e7df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davor=20Raci=C4=87?= Date: Sun, 1 Feb 2026 13:39:09 +0100 Subject: [PATCH] fix: convert absolute paths to relative in task-tool-command-generator --- .../lib/ide/shared/task-tool-command-generator.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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);