fix: convert absolute paths to relative in task-tool-command-generator
This commit is contained in:
parent
1d505b17b4
commit
a69810afe5
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue