Skip to content

Commit 7a25598

Browse files
committed
fix: normalize sourceFile paths to use forward slashes in exported YAML
- Fixes Windows test failure where backslashes in sourceFile paths were causing test assertions to fail - Ensures cross-platform compatibility by normalizing all paths to use forward slashes in YAML exports
1 parent 68e5f0b commit 7a25598

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/config/CustomModesManager.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,11 @@ export class CustomModesManager {
878878
source: "project" as const,
879879
}
880880

881+
// Normalize sourceFile path to use forward slashes if it exists
882+
if ((exportMode as any).sourceFile) {
883+
;(exportMode as any).sourceFile = (exportMode as any).sourceFile.replace(/\\/g, "/")
884+
}
885+
881886
// Merge custom prompts if provided
882887
if (customPrompts) {
883888
if (customPrompts.roleDefinition) exportMode.roleDefinition = customPrompts.roleDefinition

0 commit comments

Comments
 (0)