mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 20:23:36 +00:00
refactor: improve KanbanCard styling and enhance path normalization in worktree routes
- Updated the button variant in KanbanCard for better visual consistency. - Adjusted CSS classes for improved styling of shortcut keys. - Introduced a normalizePath function to ensure consistent path formatting across platforms. - Updated worktree routes to utilize normalizePath for path handling, enhancing cross-platform compatibility.
This commit is contained in:
@@ -13,6 +13,15 @@ import {
|
||||
const logger = createLogger("Worktree");
|
||||
const execAsync = promisify(exec);
|
||||
|
||||
/**
|
||||
* Normalize path separators to forward slashes for cross-platform consistency.
|
||||
* This ensures paths from `path.join()` (backslashes on Windows) match paths
|
||||
* from git commands (which may use forward slashes).
|
||||
*/
|
||||
export function normalizePath(p: string): string {
|
||||
return p.replace(/\\/g, "/");
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a path is a git repo
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user