fix: normalize worktree paths and update branch listing logic

- Updated the branch listing command to remove quotes around branch names, ensuring compatibility across platforms.
- Enhanced worktree path comparisons in tests to normalize path separators, improving consistency between server and client environments.
- Adjusted workspace root resolution to reflect the correct directory structure for the UI.

This addresses potential discrepancies in branch names and worktree paths, particularly on Windows systems.
This commit is contained in:
Kacper
2025-12-17 22:52:40 +01:00
parent bfc8f9bc26
commit 76cb72812f
5 changed files with 27 additions and 15 deletions

View File

@@ -3,11 +3,11 @@ import * as fs from "fs";
import * as path from "path";
/**
* Resolve the workspace root - handle both running from apps/app and from root
* Resolve the workspace root - handle both running from apps/ui and from root
*/
export function getWorkspaceRoot(): string {
const cwd = process.cwd();
if (cwd.includes("apps/app")) {
if (cwd.includes("apps/ui")) {
return path.resolve(cwd, "../..");
}
return cwd;