Skip to content

Commit 35e523e

Browse files
committed
fix(cli): add cross-platform support for critical system directory protection
- Create safe-paths utility with platform-specific critical path detection - Support Windows (C:\, C:\Windows, C:\Program Files, etc) - Support macOS (/, /System, /Library, /Applications, etc) - Support Linux (/, /usr, /etc, /var, /root, etc) - Refactor install and update commands to use new utility - Add comprehensive test suite (11 tests covering all platforms) Fixes: POSIX path handling that failed on Windows
1 parent 342154a commit 35e523e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/cli/src/utils/__tests__/safe-paths.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
1+
import { describe, it, expect, afterEach } from 'vitest';
22
import { getCriticalSystemPaths, isCriticalSystemDirectory, isUserHomeDirectory } from '../safe-paths.js';
33
import os from 'node:os';
44
import path from 'node:path';

0 commit comments

Comments
 (0)