Compare commits

...
Author SHA1 Message Date
Tabish Bidiwale 5d0752b94d chore: add changeset for cross-platform fixes release
Add changeset for patch release including fixes for joinPath behavior and slash command path resolution across platforms.
2025-10-11 02:33:24 +11:00
Tabish Bidiwale 8c65b47abe Fix cross-platform joinPath behavior (#145) 2025-10-11 01:46:32 +11:00
2 changed files with 12 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@fission-ai/openspec": patch
---
Fix cross-platform path handling issues. This release includes fixes for joinPath behavior and slash command path resolution to ensure OpenSpec works correctly across all platforms.
+7 -4
View File
@@ -56,14 +56,17 @@ export class FileSystemUtils {
const normalizedSegments = this.normalizeSegments(segments);
if (this.isWindowsBasePath(basePath)) {
const normalizedBasePath = path.win32.normalize(basePath);
return normalizedSegments.length
? path.win32.join(basePath, ...normalizedSegments)
: path.win32.normalize(basePath);
? path.win32.join(normalizedBasePath, ...normalizedSegments)
: normalizedBasePath;
}
const posixBasePath = basePath.replace(/\\/g, '/');
return normalizedSegments.length
? path.join(basePath, ...normalizedSegments)
: path.join(basePath);
? path.posix.join(posixBasePath, ...normalizedSegments)
: path.posix.normalize(posixBasePath);
}
static async createDirectory(dirPath: string): Promise<void> {